-
Book Overview & Buying
-
Table Of Contents
Machine Learning for Emotion Analysis in Python
By :
In this chapter, we saw that Naïve Bayes can work extremely well as a classifier for finding emotions in tweets. It works particularly well with large training sets (and takes very little time to train since it simply counts occurrences of words and the emotions associated with the tweets they appear in). It can be adapted fairly straightforwardly to work with datasets where a single tweet may have any number of labels (including zero) but is outperformed on the test sets with this property by the lexicon-based approaches from Chapter 5, Sentiment Lexicons and Vector Space Models. Figure 6.11 shows the best classifiers so far for the various datasets:
|
LEX |
CP |
NB (single) |
NB (multi) |
|
|
SEM4-EN |
0.503 |
0.593 |
0.775 |
... |