ments or are only used sparinglyand only in very long documents interestinglymany of the high-tf-idf features actually identify certain shows or movies these terms only appear in reviews for this particular show or franchisebut tend to appear very often in these particular reviews this is very clearfor examplefor "pokemon""smallville"and "doodlebops"but "scannershere actually also refers to movie title these words are unlikely to help us in our sentiment classification task (unless maybe some franchises are universally reviewed positively or negativelybut certainly contain lot of specific information about the reviews we can also find the words that have low inverse document frequency--that isthose that appear frequently and are therefore deemed less important the inverse document frequency values found on the training set are stored in the idf_ attributein[ ]sorted_by_idf np argsort(vectorizer idf_print("features with lowest idf:\ {}formatfeature_names[sorted_by_idf[: ]])out[ ]features with lowest idf['the'and'of'to'this'is'it'in'that'but'for'with'was'as'on'movie'not'have'one'be'film'are'you'all'at'an'by'so'from'like'who'they'there'if'his'out'just'about'he'or'has'what'some'good'can'more'when'time'up'very'even'only'no'would'my'see'really'story'which'well'had'me'than'much'their'get'were'other'been'do'most'don'her'also'into'first'made'how'great'because'will'people'make'way'could'we'bad'after'any'too'then'them'she'watch'think'acting'movies'seen'its'him'as expectedthese are mostly english stopwords like "theand "nobut some are clearly domain-specific to the movie reviewslike "movie""film""time""story"and so on interestingly"good""great"and "badare also among the most frequent and therefore "least relevantwords according to the tf-idf measureeven though we might expect these to be very important for our sentiment analysis task investigating model coefficients finallylet' look in bit more detail into what our logistic regression model actually learned from the data because there are so many features-- , after removing the infrequent ones--we clearly cannot look at all of the coefficients at the same time howeverwe can look at the largest coefficientsand see which words these correspond to we will use the last model that we trainedbased on the tf-idf features the following bar chart (figure - shows the largest and smallest coefficients of the logistic regression modelwith the bars showing the size of each coefficient working with text data