Reputation: 166
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?
Upvotes: 1
Views: 2393
Reputation: 474141
xgb_model
argument was added to the fit()
method quite recently (Oct 1). Make sure you have the latest xgboost
version installed.
Upvotes: 1