update prediction.r