I've tried to run code and get the error too many values to unpack, how to fix the issue? This a piece of code, cannot see the error...
parameter_grid = [{'n_estimators': [100], 'max_depth': [2, 4, 7, 12, 16]}, {'max_depth': [4], 'n_estimators': [25, 50, 100, 250]}]
metrics = ['precision_weighted', 'recall_weighted']
for metric in metrics:
print("\n##### searching optimal parameters for ", metric)
classifier = GridSearchCV(ExtraTreesClassifier(random_state=0), parameter_grid, cv=5, scoring=metric)
classifier.fit(X_train, y_train)
print("\ngrid scores for the parameter grid:")
for params, avg_score, _ in classifier.cv_results_:
print(params, '-->', round(avg_score, 3))
