Model's predicted values are not the same when using Dataiku API to retrieve the model and use it in
![minliang1215](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar2.png)
minliang1215
Registered Posts: 4 ✭✭✭✭
I built an XGBoost model in DSS, and retrieved it using the Dataiku API inside python recipe. However, when I use the predict() function on the retrieved model object, the predicted values are not the same as they appear in the original model.
![](https://us.v-cdn.net/6038231/uploads/editor/00/v7qrs189joxk.png)
![](https://us.v-cdn.net/6038231/uploads/editor/6i/54ukqgp0fjpc.png)
Tagged:
Answers
-
Hi,
The original model apply a set of preprocessing on data before doing the prediction. If you want to reproduce the result, you can use directly `my_predictor.predict()`.
Another thing to be aware is that in the scoring recipe, for reproducebility, you should check the Force backend engine option
Cheers,