aws / amazon-sagemaker-examples

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.
https://sagemaker-examples.readthedocs.io
Apache License 2.0
9.98k stars 6.73k forks source link

unclear method '_Booster.save_model' in xgboost_bring_your_own_model.ipynb #1089

Open sermolin opened 4 years ago

sermolin commented 4 years ago

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?

aws-patlin commented 4 years ago

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!