accuracy to evaluate the model for best accuracy you can set it to other parameters to evaluate the model on other metrics like scoreprecisionrecall and so on check out modules/model_evaluation html#scoring-parameter for further details you can view the grid search results for all the hyperparameter combinations as follows in [ ]results wqp_clf cv_results_ for paramscore_meanscore_sd in zip(results['params']results['mean_test_score']results['std_test_score'])print(paramround(score_mean )round(score_sd ){'max_features''auto''n_estimators' {'max_features''auto''n_estimators' {'max_features''auto''n_estimators' {'max_features''auto''n_estimators' {'max_features'none'n_estimators' {'max_features'none'n_estimators' {'max_features'none'n_estimators' {'max_features'none'n_estimators' {'max_features''log ''n_estimators' {'max_features''log ''n_estimators' {'max_features''log ''n_estimators' {'max_features''log ''n_estimators' the preceding output depicts the selected hyperparameter combinations and its corresponding mean accuracy and standard deviation values across the grid let' train new random forest model with the tuned hyperparameters and evaluate its performance on the test data in [ ]wqp_rf randomforestclassifier(n_estimators= max_features='auto'random_state= wqp_rf fit(wqp_train_sxwqp_train_ywqp_rf_predictions wqp_rf predict(wqp_test_sxmeu display_model_performance_metrics(true_labels=wqp_test_ypredicted_labels=wqp_rf_predictionsclasses=wqp_label_namesfigure - model performance metrics for tuned random forest for wine quality predictive model the model prediction results on the test dataset depict an overall score and model accuracy of approximately %as seen in figure - this is quite good considering we got an improvement of from the initial random forest model before tuning and overall we got an improvement of from the base decision tree model also we can see that no low quality wine sample has been misclassified as high similarly no high quality wine sample has been misclassified as low there is considerable overlap between medium and high\low quality wine samples but that is expected given the nature of the data and class distribution