| Literature DB >> 36262147 |
Anuradha Yenkikar1, C Narendra Babu1, D Jude Hemanth2.
Abstract
The exponential rise in social media via microblogging sites like Twitter has sparked curiosity in sentiment analysis that exploits user feedback towards a targeted product or service. Considering its significance in business intelligence and decision-making, numerous efforts have been made in this area. However, lack of dictionaries, unannotated data, large-scale unstructured data, and low accuracies have plagued these approaches. Also, sentiment classification through classifier ensemble has been underexplored in literature. In this article, we propose a Semantic Relational Machine Learning (SRML) model that automatically classifies the sentiment of tweets by using classifier ensemble and optimal features. The model employs the Cascaded Feature Selection (CFS) strategy, a novel statistical assessment approach based on Wilcoxon rank sum test, univariate logistic regression assisted significant predictor test and cross-correlation test. It further uses the efficacy of word2vec-based continuous bag-of-words and n-gram feature extraction in conjunction with SentiWordNet for finding optimal features for classification. We experiment on six public Twitter sentiment datasets, the STS-Gold dataset, the Obama-McCain Debate (OMD) dataset, the healthcare reform (HCR) dataset and the SemEval2017 Task 4A, 4B and 4C on a heterogeneous classifier ensemble comprising fourteen individual classifiers from different paradigms. Results from the experimental study indicate that CFS supports in attaining a higher classification accuracy with up to 50% lesser features compared to count vectorizer approach. In Intra-model performance assessment, the Artificial Neural Network-Gradient Descent (ANN-GD) classifier performs comparatively better than other individual classifiers, but the Best Trained Ensemble (BTE) strategy outperforms on all metrics. In inter-model performance assessment with existing state-of-the-art systems, the proposed model achieved higher accuracy and outperforms more accomplished models employing quantum-inspired sentiment representation (QSR), transformer-based methods like BERT, BERTweet, RoBERTa and ensemble techniques. The research thus provides critical insights into implementing similar strategy into building more generic and robust expert system for sentiment analysis that can be leveraged across industries.Entities:
Keywords: Deep learning; Ensemble model; Natural language processing; Sentiment analysis
Year: 2022 PMID: 36262147 PMCID: PMC9575864 DOI: 10.7717/peerj-cs.1100
Source DB: PubMed Journal: PeerJ Comput Sci ISSN: 2376-5992
Figure 1Semantic relational machine learning ensemble model architecture for sentiment classification.
Figure 2Stepwise flow-chart of SRML.
Dataset statistics.
| Dataset title and details | Class | Strongly negative | Negative | Neutral | Positive | Strongly positive | Total |
|---|---|---|---|---|---|---|---|
| D1: STS-GOLD ( | 2 | – | 1,402 | 632 | – | 2,034 | |
| D2: OMD ( | 2 | – | 1,196 | – | 710 | – | 1,906 |
| D3: HCR ( | 2 | – | 1,369 | – | 539 | – | 1,908 |
| D4: SemEval-2017, Task 4A Train ( | 3 | – | 7,840 | 22,591 | 19,902 | – | 50,333 |
| D4: Test set | 3 | 3,972 | 5,937 | 2,375 | – | 12,284 | |
| D5: SemEval-2017, Task 4B Train ( | 3 | – | 4,013 | 1,544 | 14,951 | – | 20,508 |
| D5: Test set | 3 | – | 3,722 | – | 2,463 | – | 6,185 |
| D6: SemEval-2017, Task 4C Train ( | 5 | 299 | 3,398 | 12,993 | 12,922 | 1,020 | 30,632 |
| D6: Test set | 5 | 177 | 3,545 | 6,194 | 2,332 | 131 | 12,379 |
Figure 3Schematic diagram of cascade feature selection approach.
Algorithm to find optimal features using Wilcoxon signed rank score.
| |
| |
| |
| Find W-value |
| Discard |
|
|
|
|
|
|
Figure 4Decision tree used for sentiment classification.
Figure 5Illustration of support vector machine.
Figure 6ANN architecture used in SRML.
Algorithm for calculating sentiment score of a tweet.
| |
| |
| |
|
|
|
|
| |
|
|
|
|
| |
| |
|
|
| |
|
|
| |
| |
| |
|
|
|
|
| |
|
|
|
|
|
|
Algorithm for sentiment prediction of a tweet in ensemble model.
| |
|
|
| |
|
|
| Calculate cosine similarity of |
| using distance calculation formulation |
| Find most similar tweet of |
| Calculate |
| Use maximum voting |
|
|
| |
|
|
|
|
|
|
|
|
|
|
Figure 7Optimal feature selection statistics.
Classifier accuracy comparison using the CFS approach.
| Dataset | STS-Gold | OMD | HCR | SemEval Task 4A | SemEval Task 4B | SemEval Task 4C | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | Acc. (%) with CV | Acc. (%) with CFS | Acc. (%) with CV | Acc. (%) with CFS | Acc. (%) with CV | Acc. (%) with CFS | Acc. (%) with CV | Acc. (%) with CFS | Acc. (%) with CV | Acc. (%) with CFS | Acc. (%) with CV | Acc. (%) with CFS |
| LOGR-SAG | 81.92 | 83.01 | 82.28 | 83.29 | 78.39 | 80.89 | 65.43 | 69.52 | 75.72 | 76.98 | 73.65 | 76.32 |
| ANN-GD | 85.27 | 87.82 | 84.58 | 85.18 | 80.76 | 81.28 | 56.73 | 60.13 | 73.87 | 76.76 | 72.86 | 74.38 |
| SVM-Lin | 81.02 | 82.37 | 78.92 | 81.73 | 78.27 | 80.29 | 64.44 | 69.32 | 72.19 | 75.32 | 69.59 | 73.27 |
| MVE | 82.73 | 83.69 | 81.29 | 83.23 | 79.39 | 81.94 | 69.87 | 73.32 | 76.87 | 78.29 | 74.54 | 77.89 |
Experimental results of individual classifiers and ensemble model on dataset D1 (Best results in bold).
| Techniques | Acc. (%) | Positive class | Negative class | Average | ||||
|---|---|---|---|---|---|---|---|---|
| Prec (%) | Rec (%) | F1 (%) | Prec (%) | Rec (%) | F1 (%) | F1 (%) | ||
| Individual classifiers | ||||||||
| LOGR-NCG | 73.28 | 73.45 | 78.38 | 75.83 | 74.04 | 77.89 | 75.92 | 75.88 |
| LOGR-SAG | 83.01 | 76.59 | 72.37 | 74.42 | 76.35 | 73.55 | 74.92 | 74.67 |
| LOGR-SAGA | 75.87 | 73.79 | 74.32 | 74.05 | 74.79 | 73.32 | 74.05 | 74.05 |
| LOGR-LBFGS | 79.49 | 76.39 | 75.21 | 75.80 | 76.33 | 76.11 | 76.22 | 76.01 |
| DT | 69.98 | 63.27 | 62.89 | 63.08 | 62.89 | 63.93 | 63.41 | 63.25 |
| SVM-Lin | 82.37 | 81.28 | 76.38 | 78.75 | 81.78 | 77.83 | 79.76 | 79.26 |
| SVM-Poly | 85.37 | 82.13 | 79.82 | 80.96 | 81.69 | 79.21 | 80.43 | 80.70 |
| SVM-RBF | 83.49 |
|
|
|
|
|
|
|
| SVM-Sig |
| 82.92 | 76.39 | 79.52 | 83.21 | 75.98 | 79.43 | 79.48 |
| ELM-T | 73.29 | 73.48 | 69.82 | 71.60 | 73.41 | 69.33 | 71.31 | 71.46 |
| ELM-SIN | 75.39 | 76.32 | 70.85 | 73.48 | 75.86 | 71.37 | 73.55 | 73.52 |
| ELM-TRI | 74.26 | 69.48 | 67.82 | 68.64 | 68.98 | 67.98 | 68.48 | 68.56 |
| ELM-HL | 73.47 | 71.28 | 65.83 | 68.45 | 71.58 | 66.23 | 68.80 | 68.63 |
| ANN-GD |
| 82.37 | 79.94 | 81.14 | 81.66 | 80.31 | 80.98 | 81.06 |
| Ensemble classifiers | ||||||||
| MVE | 83.69 | 85.25 | 82.39 | 83.80 | 85.75 | 82.74 | 84.22 | 84.01 |
| BTE |
|
|
|
|
|
|
|
|
Experimental results of individual classifiers and ensemble model on dataset D3 (Best results in bold).
| Techniques | Acc (%) | Positive class | Negative class | Average | ||||
|---|---|---|---|---|---|---|---|---|
| Prec (%) | Rec (%) | F1 (%) | Prec (%) | Rec (%) | F1 (%) | F1 (%) | ||
| Individual classifiers | ||||||||
| LOGR-NCG | 83.32 | 74.38 | 74.29 | 74.33 | 73.33 | 74.92 | 74.12 | 74.23 |
| LOGR-SAG | 80.89 | 76.39 | 79.45 | 77.89 | 76.53 | 79.41 | 77.94 | 77.92 |
| LOGR-SAGA | 83.23 | 75.43 | 80.13 | 77.71 | 76.13 | 80.35 | 78.18 | 77.95 |
| LOGR-LBFGS |
| 78.76 | 78.92 | 78.84 | 78.99 | 79.22 | 79.10 | 78.97 |
| DT | 78.29 | 73.29 | 74.57 | 73.92 | 73.62 | 74.76 | 74.19 | 74.06 |
| SVM-Lin | 80.29 | 84.39 | 81.29 |
| 84.34 | 81.65 |
|
|
| SVM-Poly | 81.23 | 82.17 |
| 82.75 | 82.37 | 83.45 | 82.91 | 82.83 |
| SVM-RBF | 80.82 | 81.27 | 82.97 | 82.11 | 81.27 | 82.97 | 82.11 | 82.11 |
| SVM-Sig | 80.02 |
| 80.19 | 82.24 |
| 80.19 | 82.24 | 82.24 |
| ELM-T | 78.03 | 73.34 | 74.39 | 73.86 | 73.14 | 73.48 | 73.31 | 73.59 |
| ELM-SIN | 79.05 | 76.29 | 72.39 | 74.29 | 76.21 | 72.23 | 74.17 | 74.23 |
| ELM-TRI | 79.36 | 72.39 | 74.28 | 73.32 | 72.31 | 74.31 | 73.30 | 73.31 |
| ELM-HL | 76.04 | 74.12 | 71.12 | 72.59 | 74.11 | 71.42 | 72.74 | 72.67 |
| ANN-GD | 81.28 | 81.28 | 83.12 | 82.19 | 81.33 |
| 82.41 | 82.30 |
| Ensemble classifiers | ||||||||
| MVE | 81.94 | 82.19 | 81.11 | 81.65 | 82.23 | 81.21 | 81.72 | 81.69 |
| BTE |
|
|
|
|
|
|
|
|
Experimental results of individual classifiers and ensemble model on dataset D4 (Best results in bold).
| Techniques | Acc (%) | AvgRec (%) | |
|---|---|---|---|
| Individual classifiers | |||
| LOGR-NCG | 69.78 | 65.92 | 67.04 |
| LOGR-SAG | 68.98 | 65.43 | 65.29 |
| LOGR-SAGA | 71.09 | 64.28 | 65.08 |
| LOGR-LBFGS | 68.93 | 64.35 | 64.96 |
| DT | 65.09 | 64.29 | 61.67 |
| SVM-Lin | 68.42 | 62.19 | 63.22 |
| SVM-Poly | 68.02 | 59.98 | 64.19 |
| SVM-RBF | 65.94 | 67.23 | 64.85 |
| SVM-Sig | 67.82 | 66.93 | 64.05 |
| ELM-T | 56.82 | 59.88 | 58.12 |
| ELM-SIN | 59.82 | 57.29 | 57.42 |
| ELM-TRI | 59.02 | 54.71 | 58.27 |
| ELM-HL | 60.03 | 58.37 | 59.99 |
| ANN-GD |
|
|
|
| Heterogeneous ensemble learning (HEL) models | |||
| MVE | 71.35 | 67.82 | 69.49 |
| BTE |
|
|
|
Experimental results of individual classifiers and ensemble model on dataset D6 (Best results in bold).
| Techniques | Acc (%) |
|
|---|---|---|
| Individual classifiers | ||
| LOGR-NCG | 73.23 | 0.713 |
| LOGR-SAG | 71.27 | 0.727 |
| LOGR-SAGA | 72.48 | 0.718 |
| LOGR-LBFGS | 73.23 | 0.734 |
| DT | 72.65 | 0.824 |
| SVM-Lin | 70.58 | 0.829 |
| SVM-Poly | 67.43 | 0.798 |
| SVM-RBF | 61.38 | 0.812 |
| SVM-Sig | 62.87 | 0.827 |
| ELM-T | 61.78 | 0.783 |
| ELM-SIN | 65.87 | 0.718 |
| ELM-TRI | 63.98 | 0.698 |
| ELM-HL | 62.98 | 0.729 |
| ANN-GD |
|
|
| Heterogeneous ensemble learning (HEL) models | ||
| MVE | 74.88 | 0.565 |
| BTE |
|
|
Experimental results of individual classifiers and ensemble model on dataset D2 (Best results in bold).
| Techniques | Acc (%) | Positive class | Negative class | Average | ||||
|---|---|---|---|---|---|---|---|---|
| Prec (%) | Rec (%) | F1 (%) | Prec (%) | Rec (%) | F1 (%) | F1 (%) | ||
| Individual classifiers | ||||||||
| LOGR-NCG | 83.93 | 73.29 | 75.45 | 74.35 | 74.32 | 74.95 | 74.63 | 74.49 |
| LOGR-SAG | 83.29 | 74.83 | 76.39 | 75.60 | 74.21 | 75.99 | 75.09 | 75.35 |
| LOGR-SAGA | 85.12 | 72.39 | 72.36 | 72.37 | 73.09 | 72.68 | 72.88 | 72.63 |
| LOGR-LBFGS | 82.8 | 76.52 | 75.48 | 76.00 | 76.96 | 74.98 | 75.96 | 75.98 |
| DT | 71.93 | 70.12 | 74.29 | 72.14 | 70.68 | 75.32 | 72.93 | 72.54 |
| SVM-Lin | 81.79 | 82.14 | 84.28 | 83.20 | 83.11 |
|
| 83.68 |
| SVM-Poly | 83.74 |
| 82.19 | 83.17 |
| 83.10 | 83.66 | 83.42 |
| SVM-RBF | 84.74 | 80.97 | 81.87 | 81.42 | 81.08 | 82.23 | 81.65 | 81.54 |
| SVM-Sig |
| 83.91 | 83.5 | 83.37 | 84.21 | 83.86 | 84.03 |
|
| ELM-T | 78.39 | 73.29 | 71.75 | 72.51 | 74.19 | 72.35 | 73.26 | 72.89 |
| ELM-SIN | 76.82 | 75.83 | 70.23 | 72.92 | 76.33 | 71.32 | 73.74 | 73.33 |
| ELM-TRI | 70.27 | 71.29 | 74.39 | 72.81 | 71.29 | 74.39 | 72.81 | 72.81 |
| ELM-HL | 72.29 | 68.56 | 71.28 | 69.89 | 68.63 | 71.81 | 70.18 | 70.04 |
| ANN-GD | 85.18 | 82.94 |
|
| 83.01 | 84.39 | 83.69 | 83.68 |
| Ensemble classifiers | ||||||||
| MVE | 83.23 | 84.27 | 81.09 | 82.65 | 83.77 | 80.96 | 82.34 | 82.50 |
| BTE |
|
|
|
|
|
|
|
|
Experimental results of individual classifiers and ensemble model on dataset D5 (Best results in bold).
| Techniques | Acc (%) | Positive class | Negative class | Average | ||||
|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| ||
| Individual classifiers | ||||||||
| LOGR-NCG | 87.97 | 85.39 | 84.39 | 84.89 | 87.37 | 84.29 | 85.8 | 85.34 |
| LOGR-SAG | 85.59 | 83.49 | 82.98 | 83.23 | 80.09 | 83.29 | 81.66 | 82.45 |
| LOGR-SAGA | 88.89 | 83.29 | 83.98 | 83.63 | 82.89 | 84.2 | 83.54 | 83.59 |
| LOGR-LBFGS | 83.89 | 81.29 | 83.29 | 82.28 | 82.99 | 85.3 | 84.13 | 83.20 |
| DT | 74.88 | 75.98 | 73.49 | 74.71 | 75.92 | 72.39 | 74.11 | 74.41 |
| SVM-Lin | 81.29 | 80.39 | 79.29 | 79.84 | 82.39 | 80.44 | 81.29 | 80.56 |
| SVM-Poly | 82.39 | 82.78 | 83.49 | 83.13 | 81.39 | 80.27 | 80.83 | 81.98 |
| SVM-RBF | 81.98 | 80.21 | 79.49 | 79.85 | 83.2 | 80.29 | 81.72 | 80.78 |
| SVM-Sig | 80.29 | 81.74 | 80.38 | 81.05 | 81.29 | 82.87 | 82.07 | 81.56 |
| ELM-T | 79.39 | 80.28 | 78.49 | 79.37 | 81.29 | 79.4 | 80.33 | 79.85 |
| ELM-SIN | 82.1 | 83.8 | 81.71 | 82.74 | 83.87 | 82.74 | 83.3 | 83.02 |
| ELM-TRI | 82.87 | 83.75 | 84.55 | 84.15 | 82.58 | 84.29 | 83.43 | 83.79 |
| ELM-HL | 83.71 | 82.48 | 83.87 | 83.17 | 82.68 | 81.28 | 81.97 | 82.57 |
| ANN-GD |
|
|
|
|
|
|
|
|
| Ensemble classifiers | ||||||||
| MVE = BTE |
|
|
|
|
|
|
|
|
Performance comparison of proposed system with state-of-the-art system on dataset D1 (Best results in bold).
| Et al., Year | Model | Acc (%) |
|---|---|---|
|
| GloVe-DCNN | 85.97 |
|
| SVM+T-conorm method | 85.92 |
| MNB+T-conorm method | 84.16 | |
|
| SVM SSWE static | 88.99 |
| SVM+RoBERTa | 89.48 | |
| SVM+BERT | 90.46 | |
| SVM+BERTweet |
| |
| Proposed | CFS augmented Best Trained Ensemble | 86.23 |
Performance comparison of proposed system with state-of-the-art system on dataset D2 (Best results in bold).
| Et al., Year | Model | Acc (%) |
|---|---|---|
|
| QSR-NB | 65 |
| QSR-SVM | 66 | |
| QSR-RF | 64.5 | |
|
| SVM+RoBERTa-static | 85.10 |
| SVM+BERT | 85.62 | |
| SVM+BERTweet | 87.36 | |
|
| SVM+T-conorm method | 87.75 |
| MNB+T-conorm method | 84.11 | |
|
| Ensemble of 4 base classifiers (stacking) | 87.57 |
| Proposed | CFS augmented Best Trained Ensemble |
|
Performance comparison of proposed system with state-of-the-art system on dataset D3 (Best results in bold).
| Et al., Year | Model | Acc (%) |
|---|---|---|
|
| SVM TF-IDF | 72 |
| NB TF-IDF | 72 | |
|
| SVM TF-IDF | 80.24 |
| SVM+RoBERTa | 76.67 | |
| SVM+BERT | 78.61 | |
| SVM+BERTweet | 79.82 | |
|
| Ensemble of 4 base classifiers (stacking) | 85.10 |
| Proposed | CFS augmented Best Trained Ensemble |
|
Performance comparison of proposed system with state-of-the-art system on dataset D4 (Best results in bold).
| Et al., Year, System | Acc (%) | AveRec (%) | |
|---|---|---|---|
| 65.8 | 68.1 | 68.5 | |
| 65.1 | 68.1 | 67.7 | |
| 66.1 | 67.6 | 67.4 | |
| Proposed CFS augmented BTE |
|
|
|
Performance comparison of proposed system with state-of-the-art system on dataset D5 (Best results in bold).
| Et al., Year, System | Acc (%) | AvgRec (%) | F1-score (%) |
|---|---|---|---|
| 89.7 | 88.2 | 89 | |
| 86.9 | 85.6 | 86.1 | |
| 86.3 | 85.4 | 85.6 | |
| Proposed CFS augmented BTE |
|
|
|
Performance comparison of proposed system with state-of-the-art system on dataset D6 (Best results in bold).
| Et al., Year, System |
|
|---|---|
| 0.599 | |
| 0.623 | |
| 0.640 | |
| 0.555 | |
|
| |
| Proposed CFS augmented BTE | 0.521 |