On the link of XGBoost guide:
After training, the model can be saved.
bst.save_model(\'0001.model\')The model a
I found my way here because I was looking for a way to save and load my xgboost model. Here is how I solved my problem:
import pickle
file_name = "xgb_reg.pkl"
# save
pickle.dump(xgb_model, open(file_name, "wb"))
# load
xgb_model_loaded = pickle.load(open(file_name, "rb"))
# test
ind = 1
test = X_val[ind]
xgb_model_loaded.predict(test)[0] == xgb_model.predict(test)[0]
Out[1]: True