amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

unclear method '_Booster.save_model' in xgboost_bring_your_own_model.ipynb

Open sermolin opened this issue 6 years ago • 1 comments

https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/xgboost_bring_your_own_model/xgboost_bring_your_own_model.ipynb

I can't find documentation for "_Booster" method used in bt._Booster.save_model(model_file_name) Could you, please, clarify?

sermolin avatar Mar 12 '20 17:03 sermolin

Hi Sergey,

This is referring to the underlying booster object in the XGBClassifier class. The proper API to retrieve this value is by calling bt.get_booster(). From the XGBoost source code, this function just returns the self._Booster member, which we are directly accessing in the example notebook. Hope this helps!

aws-patlin avatar Mar 19 '20 19:03 aws-patlin