I am using XGBClassifier for my image classification. As i am new to machine learning and xgboost. But recently i got to know that the model i am saving by using pickle library after certain iteration is the last iteration not the best iteration. Can anyone tell me how can i save the model from best iteration? Obviously i am using early stop. I kindly apologize if i make any mistake in asking questions. Please i need the solution as soon as possible because i need it for my thesis. And those who are suggesting me older questions for best iteration please my question is different i want to save the best iteration in pickle format so that i can use it in future not just use it in predict later in the same code. Thank you.
Asked
Active
Viewed 1,089 times
-2
-
1Does this answer your question? [XGBoost Best Iteration](https://stackoverflow.com/questions/51955256/xgboost-best-iteration) – null Nov 08 '20 at 12:29
-
1no this doesnt i want to save my model so that later i can use it in pickle format. This just tells how to predict using best iteration. Please tell me how i can save the best iteration. Now with the code i am using its saving the model from last iteration not the best iteration model. – Sumriti Ranjan Patra Nov 08 '20 at 13:41
1 Answers
-3
use joblib dump/load to save/load the model, and get the booster of the model, to get the best iteration

lhztop
- 1