-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Data Science with Python
By :

The last piece in mastering structured data is the ability to save and load the models that you have trained and fine-tuned. Training a new model every time we need a prediction will waste a lot of time, so being able to save a trained model is imperative for data scientists. The saved model allows us to replicate the results and to create apps and services that make use of the machine learning model. The steps are as follows:
model.save_model('wholesale-model.model')
loaded_model = xgb.Booster({'nthread': 2})
loaded_model.load_model('wholesale-model.model')
If you give XGBoost access to all the threads it can get, your computer might become slow while training or predicting.
You are now ready to get started on modeling your structured dataset using the XGBoost...