1

I am trying to perform incremental learning with XGB, wrapped with Sklearn's MultiOutputRegressor to obtain multi-class regression:

# For instance
# X = np.zeros((1, 8)
# y = np.zeros((1, 32)

multi_model = MultiOutputRegressor(
            xgb.XGBRegressor(objective='reg:squarederror')
            ).fit(X, y)

However, if I repeatedly call multimodel.fit(X_new, y_new) it creates a new model, without performing incremental learning.

I tried with "partial_fit()" and specifying "multi_model" within the .fit function but both solutions are not supported.

How could I achieve incremental learning with multi-class XGB?

Alessandro Ceccarelli
  • 1,775
  • 5
  • 21
  • 41

1 Answers1

0

Have you tried saving and reusing your previous saved model and passing it to fit(xgb_model = 'trained_xgb_model.model')? Refer to this post

hmohanna
  • 71
  • 4
  • I can't; if you check Sklearn's documentation for MultiOutputRegressor (https://scikit-learn.org/stable/modules/generated/sklearn.multioutput.MultiOutputRegressor.html), the .fit method can only accept X and y. – Alessandro Ceccarelli Dec 26 '19 at 10:11