Add the updating of weights in the prediction model