-
Notifications
You must be signed in to change notification settings - Fork 136
Issues when using RandomForestRegressor as estimator in HSTreeRegressor #212
Copy link
Copy link
Open
Description
Hi! I am trying to use the shrinkage algorithm in some tree-based ensemble methods I have (more precisely, Random Forrest). I know how to use imodels with decision trees, but I want to use the shrinkage in a ensemble of trees just as it is mentioned at the end of the docs. Here is the example for a regression problem:
from sklearn.ensemble import RandomForestRegressor
from imodels import HSTreeRegressor
ensemble = RandomForestRegressor()
model_imodel = HSTreeRegressor(estimator_=ensemble)
model_imodel = model.fit(X, Y)However, it seems that the HSTreeRegressor class just accept tree methods.
InvalidParameterError: The 'decision_tree' parameter of export_text must be an instance of 'sklearn.tree._classes.DecisionTreeClassifier' or an instance of 'sklearn.tree._classes.DecisionTreeRegressor'. Got RandomForestClassifier() instead.
Is this correct? Am I doing something wrong or something has changed in the API in recent versions?
Thank you so much!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels