Error RandomForest

Hi,
I have this error when trying to run my model with random forest regressor :
ValueError: Invalid parameter min_impurity_split for estimator DecisionTreeRegressor(criterion=‘mse’, max_features=‘auto’). Check the list of available parameters with estimator.get_params().keys().

I have no idea why …

Many thanks

Valid parameters for DecisionTreeRegressor are listed on the scikit-learn documentation: sklearn.tree.DecisionTreeRegressor — scikit-learn 1.0.2 documentation

min_impurity_split is not one of them. Perhaps you’re thinking of min_samples_split or min_impurity_decrease?

Doing something like the following will result in the error you’re seeing:

from sklearn.tree import DecisionTreeRegressor

reg = DecisionTreeRegressor(min_impurity_split=1)
1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.