Hostname: page-component-74656f9884-c52kr Total loading time: 0 Render date: 2026-11-07T08:45:19.258Z Has data issue: false hasContentIssue false

To use or not to use: Feature selection for sentiment analysis of highly imbalanced data†

Published online by Cambridge University Press:  07 August 2017

SANDRA KÜBLER
Affiliation:
Department of Linguistics, Indiana University, Bloomington, IN 47405, USA e-mail: skuebler@indiana.edu
CAN LIU
Affiliation:
Department of Computer Science, Indiana University, Bloomington, IN 47405, USA e-mails: liucan@indiana.edu, zasayyed@indiana.edu
ZEESHAN ALI SAYYED
Affiliation:
Department of Computer Science, Indiana University, Bloomington, IN 47405, USA e-mails: liucan@indiana.edu, zasayyed@indiana.edu
Rights & Permissions [Opens in a new window]

Abstract

We investigate feature selection methods for machine learning approaches in sentiment analysis. More specifically, we use data from the cooking platform Epicurious and attempt to predict ratings for recipes based on user reviews. In machine learning approaches to such tasks, it is a common approach to use word or part-of-speech n-grams. This results in a large set of features, out of which only a small subset may be good indicators for the sentiment. One of the questions we investigate concerns the extension of feature selection methods from a binary classification setting to a multi-class problem. We show that an inherently multi-class approach, multi-class information gain, outperforms ensembles of binary methods. We also investigate how to mitigate the effects of extreme skewing in our data set by making our features more robust and by using review and recipe sampling. We show that over-sampling is the best method for boosting performance on the minority classes, but it also results in a severe drop in overall accuracy of at least 6 per cent points.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2017 
Figure 0

Table 1. The distribution of ratings in the Epicurious data set

Figure 1

Fig. 1. Comparing methods for multi-class feature selection (micro-F).

Figure 2

Table 2. Results comparing feature selection methods for multi-class classification

Figure 3

Table 3. Top ten features chosen by different feature selection methods

Figure 4

Table 4. Results for improving performance on minority classes (using 2,500 features)

Figure 5

Table 5. Examples of word clusters created by Brown clustering

Figure 6

Fig. 2. Effect of using review sampling on the precision and recall of the 2-fork class.

Figure 7

Fig. 3. Effect of using over-sampling on the precision and recall of the 2-fork class.

Figure 8

Fig. 4. Loss in accuracy using over-sampling.

Figure 9

Table 6. The effect of down-sampling feature sets for M-IG

Figure 10

Fig. 5. Information gain values for features chosen by M-IG, outliers reflect the common words.

Figure 11

Table 7. Combining multi-class IG and 1-versus-NBS for feature selection

Figure 12

Fig. 6. Feature coverage for different settings combining M-IG and 1-versus-NBS (as ratios of the full sets).

Figure 13

Table 8. Analyzing the role of multiply occurring features

Figure 14

Fig. 7. Feature quality in the 1-versus-ALL setting for multiply occurring features.

Figure 15

Fig. 8. Feature quality in settings where multiply occurring features are removed.

Figure 16

Fig. 9. Feature quality in settings where multiply occurring features are kept.

Figure 17

Table 9. The absolute size of features per class

Figure 18

Fig. 10. Feature coverage for different ways of handling multiply occurring features.