[' ''affections''appropriately''barbra''blurbs''butchered''cheese''commitment''courts''deconstructed''disgraceful''dvds''eschews''fell''freezer''goriest''hauser''hungary''insinuate''juggle''leering''maelstrom''messiah''music''occasional''parking''pleasantville''pronunciation''recipient''reviews''sas''shea''sneers''steiger''swastika''thrusting''tvs''vampyre''westerns'there are clearly many fewer numbersand some of the more obscure words or misspellings seem to have vanished let' see how well our model performs by doing grid search againin[ ]grid gridsearchcv(logisticregression()param_gridcv= grid fit(x_trainy_trainprint("best cross-validation score{ }format(grid best_score_)out[ ]best cross-validation score the best validation accuracy of the grid search is still %unchanged from before we didn' improve our modelbut having fewer features to deal with speeds up processing and throwing away useless features might make the model more interpretable if the transform method of countvectorizer is called on document that contains words that were not contained in the training datathese words will be ignored as they are not part of the dictionary this is not really an issue for classificationas it' not possible to learn anything about words that are not in the training data for some applicationslike spam detectionit might be helpful to add feature that encodes how many so-called "out of vocabularywords there are in particular documentthough for this to workyou need to set min_dfotherwisethis feature will never be active during training stopwords another way that we can get rid of uninformative words is by discarding words that are too frequent to be informative there are two main approachesusing languagespecific list of stopwordsor discarding words that appear too frequently scikitlearn has built-in list of english stopwords in the feature_extraction text module working with text data