I currently have the following imbalanced learn Pipeline set-up:
Pipeline(steps=[('sampling',
FunctionSampler(func=<function ...>)),
('classification',
BalancedBaggingClassifier(base_estimator=XGBClassifier(..., n_estimators=10))
])
using imblearn
, sklearn
and xgboost
. I am saving the trained model using the joblib
library and loading it up again in another script. My goal is then to train the pre-trained model from the loaded starting point.
How I would do this using just the XGBClassifier
is something like this (see here):
model = model.fit(X_train, y_train, xgb_model=model.get_booster())
where model
would be loaded using joblib
.
However, in the boosting case, I essentially have n_estimators
many estimators. I know how to access them individually, but how can I pass all of them to the pipeline fit
function?