figaxes plt subplots( figsize=( )param_grid_linear {' 'np linspace( )'gamma'np linspace( )param_grid_one_log {' 'np linspace( )'gamma'np logspace(- )param_grid_range {' 'np logspace(- )'gamma'np logspace(- - )for param_gridax in zip([param_grid_linearparam_grid_one_logparam_grid_range]axes)grid_search gridsearchcv(svc()param_gridcv= grid_search fit(x_trainy_trainscores grid_search cv_results_['mean_test_score'reshape( plot the mean cross-validation scores scores_image mglearn tools heatmapscoresxlabel='gamma'ylabel=' 'xticklabels=param_grid['gamma']yticklabels=param_grid[' ']cmap="viridis"ax=axplt colorbar(scores_imageax=axes tolist()the first panel shows no changes at allwith constant color over the whole parameter grid in this casethis is caused by improper scaling and range of the parameters and gamma howeverif no change in accuracy is visible over the different parameter settingsit could also be that parameter is just not important at all it is usually good to try very extreme values firstto see if there are any changes in the accuracy as result of changing parameter the second panel shows vertical stripe pattern this indicates that only the setting of the gamma parameter makes any difference this could mean that the gamma parameter is searching over interesting values but the parameter is not--or it could mean the parameter is not important the third panel shows changes in both and gamma howeverwe can see that in the entire bottom left of the plotnothing interesting is happening we can probably exclude the very small values from future grid searches the optimum parameter setting is at the top right as the optimum is in the border of the plotwe can expect that there might be even better values beyond this borderand we might want to change our search range to include more parameters in this region tuning the parameter grid based on the cross-validation scores is perfectly fineand good way to explore the importance of different parameters howeveryou should not test different parameter ranges on the final test set--as we discussed earliereval model evaluation and improvement