the preceding output tells us that our model predicted the movie review indicating positive sentiment when in-fact the actual sentiment label is negative for the same review the results depicted in figure - tell us that the reviewer in fact shows signs of positive sentiment in the movie reviewespecially in parts where he\she tells us that " loved it still think the directing and cinematography are excellentas is the music alan rickman is greata bit old perhapsbut he plays the role beautifully and elizabeth spriggsshe is absolutely fantastic as always and feature words from the same have been depicted in the top features contributing to positive sentiment the model interpretation also correctly identifies the aspects of the review contributing to negative sentiment like"but it' really the script that has over the time started to bother me more and more hencethis is one of the more complex reviews which indicate both positive and negative sentiment and the final interpretation would be in the reader' hands you can now use this same framework to interpret your own classification models in the future and understand where your model might be performing well and where it might need improvementsanalyzing topic models another way of analyzing key termsconcepts or topics responsible for sentiment is to use different approach known as topic modeling we have already covered some basics into topic modeling in the section titled "topic modelsunder "feature engineering on text datain the main aim of topic models is to extract and depict key topics or concepts which are otherwise latent and not very prominent in huge corpora of text documents we have already seen the use of latent dirichlet allocation (ldafor topic modeling in in this sectionwe use another topic modeling technique called non-negative matrix factorization refer to the python file named sentiment_causal_topic_models py or the jupyter notebook titled sentiment causal analysis topic models ipynb for more interactive experience the first step in this analysis is to combine all our normalized train and test reviews and separate out these reviews into positive and negative sentiment reviews once we do thiswe will extract features from these two datasets using the tf-idf feature vectorizer the following snippet helps us achieve this in [ ]from sklearn feature_extraction text import tfidfvectorizer consolidate all normalized reviews norm_reviews norm_train_reviews+norm_test_reviews get tf-idf features for only positive reviews positive_reviews [review for reviewsentiment in zip(norm_reviewssentimentsif sentiment ='positive'ptvf tfidfvectorizer(use_idf=truemin_df= max_df= ngram_range=( , )sublinear_tf=trueptvf_features ptvf fit_transform(positive_reviewsget tf-idf features for only negative reviews negative_reviews [review for reviewsentiment in zip(norm_reviewssentimentsif sentiment ='negative'ntvf tfidfvectorizer(use_idf=truemin_df= max_df= ngram_range=( , )sublinear_tf=truentvf_features ntvf fit_transform(negative_reviewsview feature set dimensions print(ptvf_features shapentvf_features shape( (