Model Persistence

Save and load XGBoost models using joblib.

We'll cover the following

Chapter Goals:

  • Save and load XGBoost models with the joblib API

A. The joblib API

Since the XGBClassifier and XGBRegressor models follow the same format as scikit-learn models, we can save and load them in the same way. This means using the joblib API.

With the joblib API, we save and load models using the dump and load functions, respectively. See here for specific examples on model persistence with scikit-learn models.

Get hands-on with 1300+ tech skills courses.