best cross-validation score best parameters{'tfidfvectorizer__ngram_range'( )'logisticregression__c' as you can see from the resultswe improved performance by bit more than percent by adding bigram and trigram features we can visualize the cross-validation accuracy as function of the ngram_range and parameter as heat mapas we did in (see figure - )in[ ]extract scores from grid_search scores grid cv_results_['mean_test_score'reshape(- visualize heat map heatmap mglearn tools heatmapscoresxlabel=" "ylabel="ngram_range"cmap="viridis"fmt=" "xticklabels=param_grid['logisticregression__c']yticklabels=param_grid['tfidfvectorizer__ngram_range']plt colorbar(heatmapfigure - heat map visualization of mean cross-validation accuracy as function of the parameters ngram_range and from the heat map we can see that using bigrams increases performance quite bitwhile adding trigrams only provides very small benefit in terms of accuracy to understand better how the model improvedwe can visualize the important coeffi working with text data