predicted sentiment polarity- reviewi don' care if some people voted this movie to be bad if you want the truth this is very good movieit has every thing movie should have you really should get this one actual sentimentpositive predicted sentiment polarity reviewworst horror film ever but funniest film ever rolled in one you have got to see this film it is so cheap it is unbelievable but you have to see it really!!! watch the carrot actual sentimentpositive predicted sentiment polarity- we can compare the actual sentiment label for each review and also check out the predicted sentiment polarity score negative polarity typically denotes negative sentiment to predict sentiment on our complete test dataset of , reviews ( used the raw text documents because afinn takes into account other aspects like emoticons and exclamations)we can now use the following snippet used threshold of > to determine if the overall sentiment is positive else negative you can choose your own threshold based on analyzing your own corpora in the future in [ ]sentiment_polarity [afn score(reviewfor review in test_reviewspredicted_sentiments ['positiveif score > else 'negativefor score in sentiment_polaritynow that we have our predicted sentiment labelswe can evaluate our model performance based on standard performance metrics using our utility function see figure - in [ ]meu display_model_performance_metrics(true_labels=test_sentimentspredicted_labels=predicted_sentimentsclasses=['positive''negative']figure - model performance metrics for afinn lexicon based model we get an overall -score of %which is quite decent considering it' an unsupervised model looking at the confusion matrix we can clearly see that quite number of negative sentiment based reviews have been misclassified as positive ( , and this leads to the lower recall of for the negative sentiment class performance for positive class is better with regard to recall or hit-ratewhere we correctly predicted , out of , positive reviewsbut precision is because of the many wrong positive predictions made in case of negative sentiment reviews