I was trying to improve my random forest classifier parameters, but the output I was getting, does not look like the output I expected after looking at some examples from other people.
The code I'm using:
train_x, test_x, train_y, test_y = train_test_split(df, avalanche, shuffle=False)
# Create the random forest
rf = RandomForestClassifier()
rf_random = RandomizedSearchCV(estimator=rf, param_distributions=random_grid, n_iter=100, cv=3, verbose=2, random_state=42, n_jobs=-1)
# Train the model
rf_random.fit(train_x, train_y)
print(rf_random.best_params_)
The output I'm getting (this is just a few lines, but it gives me several hundred lines):
Fitting 3 folds for each of 100 candidates, totalling 300 fits
[CV] END bootstrap=True, max_depth=30, max_features=sqrt, min_samples_leaf=1, min_samples_split=5, n_estimators=400; total time= 1.3s
[CV] END bootstrap=True, max_depth=30, max_features=sqrt, min_samples_leaf=1, min_samples_split=5, n_estimators=400; total time= 1.3s
[CV] END bootstrap=True, max_depth=30, max_features=sqrt, min_samples_leaf=1, min_samples_split=5, n_estimators=400; total time= 1.4s
[CV] END bootstrap=False, max_depth=10, max_features=sqrt, min_samples_leaf=2, min_samples_split=5, n_estimators=1200; total time= 3.8
The output I was expecting:
{'bootstrap': True,
'max_depth': 70,
'max_features': 'auto',
'min_samples_leaf': 4,
'min_samples_split': 10,
'n_estimators': 400}
as from this website.
Does anyone know what I'm doing wrong or what I should change so that the output becomes what I expected it to be?