[BUG] cannot correctly clone CascadeForestRegressor
with sklearn.base.clone
when using customized estimators
#92
Labels
needtriage
Further information is requested
Describe the bug
cannot correctly clone
CascadeForestClassifier
/CascadeForestRegressor
object withsklearn.base.clone
when using customized stimatorsTo Reproduce
Expected behavior
No error
Additional context
This bug occours because when the model is cloned, if the model has customized predictor or estimators,
predictor='custom'
will be cloned, whileself.predictor_
/self.dummy_estimators
will not be correctly cloned, which introduced the bug described above.I think this bug can be easily fixed by putting the predictor and the list of estimators into the parameter of
CascadeForestClassifier
/CascadeForestRegressor
, just like the way of those meta estimators (e.g.ngboost
), but maybe the corresponding APIs will have to be changed.For example, the API parameters could be:
The text was updated successfully, but these errors were encountered: