Skip to content

Tag: random-forest

Make available .best_params_ after pipeline

How to go about making available the clf.best_params_ after carrying a pipeline? For the code I have below, I get an: AttributeError: ‘GridSearchCV’ object has no attribute ‘best_params_’ Here is my code: Answer Your clf is never fitted. You probably meant clf.fit(X_train,y_train). Als…

Random Forest tuning with RandomizedSearchCV

I have a few questions concerning Randomized grid search in a Random Forest Regression Model. My parameter grid looks like this: and my code for the RandomizedSearchCV like this: is there any way to calculate the Root mean square at each parameter set? This would be more interesting to me as the R^2 score? If…

RandomForestClassifier import

I’ve installed Anaconda Python distribution with scikit-learn. While importing RandomForestClassifier: from sklearn.ensemble import RandomForestClassifier I have the following error: File “C:Anacondalibsite-packagessklearntreetree.py”, line 36, in <module> from . import _tree ImportErr…