over the different splits for this parameter settingis stored in best_score_in[ ]print("best parameters{}format(grid_search best_params_)print("best cross-validation score{ }format(grid_search best_score_)out[ ]best parameters{' ' 'gamma' best cross-validation score againbe careful not to confuse best_score_ with the generalization performance of the model as computed by the score method on the test set using the score method (or evaluating the output of the predict methodemploys model trained on the whole training set the best_score_ attribute stores the mean cross-validation accuracywith cross-validation performed on the training set sometimes it is helpful to have access to the actual model that was found--for exampleto look at coefficients or feature importances you can access the model with the best parameters trained on the whole training set using the best_estimator_ attributein[ ]print("best estimator:\ {}format(grid_search best_estimator_)out[ ]best estimatorsvc( = cache_size= class_weight=nonecoef = decision_function_shape=nonedegree= gamma= kernel='rbf'max_iter=- probability=falserandom_state=noneshrinking=truetol= verbose=falsebecause grid_search itself has predict and score methodsusing best_estimator_ is not needed to make predictions or evaluate the model analyzing the result of cross-validation it is often helpful to visualize the results of cross-validationto understand how the model generalization depends on the parameters we are searching as grid searches are quite computationally expensive to runoften it is good idea to start with relatively coarse and small grid we can then inspect the results of the cross-validated grid searchand possibly expand our search the results of grid search can be found in the cv_results_ attributewhich is dictionary storing all aspects of the search it grid search