1

According to the documentation, it should be possible to write the code like this:

# Instantiate the model
model = XGBClassifier() 
model.fit(x, y, xgb_model='model.xgb')

But it fails with :

TypeError: fit() got an unexpected keyword argument 'xgb_model'

The reference: http://xgboost.readthedocs.io/en/latest/python/python_api.html

xgb_model (str) – file name of stored xgb model or ‘Booster’ instance Xgb model to be loaded before training (allows training continuation).

Am I missing anything?

Pek
  • 166
  • 1
  • 15

1 Answers1

1

xgb_model argument was added to the fit() method quite recently (Oct 1). Make sure you have the latest xgboost version installed.

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195