Next Article in Journal
Defining Data Science by a Data-Driven Quantification of the Community
Previous Article in Journal
Using the Outlier Detection Task to Evaluate Distributional Semantic Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Analysis of Machine Learning Algorithms for Opinion Mining in Different Domains

Computer Science Department, Faculty of Computer and Information Sciences, Ain Shams University, Cairo 11566, Egypt
*
Author to whom correspondence should be addressed.
Mach. Learn. Knowl. Extr. 2019, 1(1), 224-234; https://doi.org/10.3390/make1010014
Submission received: 1 November 2018 / Revised: 29 November 2018 / Accepted: 6 December 2018 / Published: 8 December 2018
(This article belongs to the Section Learning)

Abstract

:
Sentiment classification (SC) is a reference to the task of sentiment analysis (SA), which is a subfield of natural language processing (NLP) and is used to decide whether textual content implies a positive or negative review. This research focuses on the various machine learning (ML) algorithms which are utilized in the analyzation of sentiments and in the mining of reviews in different datasets. Overall, an SC task consists of two phases. The first phase deals with feature extraction (FE). Three different FE algorithms are applied in this research. The second phase covers the classification of the reviews by using various ML algorithms. These are Naïve Bayes (NB), Stochastic Gradient Descent (SGD), Support Vector Machines (SVM), Passive Aggressive (PA), Maximum Entropy (ME), Adaptive Boosting (AdaBoost), Multinomial NB (MNB), Bernoulli NB (BNB), Ridge Regression (RR) and Logistic Regression (LR). The performance of PA with a unigram is the best among other algorithms for all used datasets (IMDB, Cornell Movies, Amazon and Twitter) and provides values that range from 87% to 99.96% for all evaluation metrics.

1. Introduction

Sentiment analysis, also known as opinion mining (OM), is defined as figuring out the public attitude of individuals toward distinct topics and news [1]. It is also the computational handling of opinions, feelings, and the subjectivity of textual content [2]. Nowadays, individuals inspect feedback and online posts about any product—which are called opinions, emotions, feelings, attitudes, considerations, beliefs or conduct of clients—before purchasing it. Sentiment analysis is the task of automatically classifying the sentiment orientation (positive or negative) of a textual content. It can be used to classify online products as recommended or not recommended (satisfied or not satisfied) [3].
There are two fundamental OM approaches used to decide whether the review or audit sentences are positive or negative [4]. The first approach is a machine learning (ML) approach which is very frequently used in sentiment analysis (SA), as this approach is based on supervised, unsupervised, and semi-supervised learning. In supervised learning, the dataset is labeled to acquire a reasonable and sensible output. Dissimilar to supervised learning, the unsupervised learning process does not have any need for labeled data. In order to tackle the issue of processing unlabeled data, clustering algorithms are utilized [5]. The second approach makes use of a present lexicon or dictionary with words, expressions, or phrases—terms labeled either positive or negative [6,7]. These approaches were performed based on real-life needs. This study presents the impact of supervised learning algorithms on different labeled datasets.
Binary sentiment classification (SC) and multi-class SC are the very regularly used methodologies of SC [8]. Each document or feedback review of the dataset is classified into two main classes, which are a positive or a negative sentiment in binary SC [9]. Whereas in multi-class SC each document could be classified into more than two classes, a degree of the sentiment could be a solid positive, positive, neutral, negative or solid negative [10].
SA is categorized into three main levels—the aspect or feature level (AL), the sentence level (SL) and the document level (DL) [11]. The AL refers to classify the sentiments that are expressed on various features or aspects of an entity. In the SL, the fundamental concern is to pick whether each sentence infers a positive, negative or neutral opinion. In the DL, the basic concern is to classify whether the whole opinion in a document implies a positive or negative sentiment. The SL and DL analyses are insufficient to precisely monitor what people accept and reject. This research focuses on the document level of sentiment analysis.
The rest of this paper is organized as follows: Section 2 presents a literature review of SA. Section 3 demonstrates the characteristics of the different datasets. In Section 4, the proposed methodology of SA is clarified. Section 5 discusses the results of the proposed methodology on different datasets. Section 6 concludes the research and introduces the scope and extension for future work.

2. Literature Review

In this section the related work is presented. It was investigated in various domains such as movie reviews, product reviews, and Twitter.
Tripathy et al. [5] did a study on classifying movie reviews using different ML algorithms, which are naïve bayes (NB), maximum entropy (ME), stochastic gradient descent (SGD), and support vector machine (SVM). These algorithms are carried out on the IMDB dataset using different combinations between n-gram approaches, for example, unigram and bigram, bigram and trigram, and unigram, bigram and trigram. Their results show that support vector machines (SVM) acquired the highest accuracy with 88.9% when unigram, bigram and trigram are applied as feature extraction.
Deng et al. [12] applied SVM combined with Importance of a Term in a Document (ITD) in order to extract features on various datasets, which are the Cornell movie reviews, Amazon products reviews and the Stanford movie reviews. Their approach certainly beats Best Matching (BM25) on two of three datasets while the distinction is indistinctive on the small Cornell movie review dataset with an accuracy of 88.50%. The accuracy of the combined algorithm is 87.44% on the Stanford movie review data set, which is greater than the BM25 (87.10%). Furthermore, the accuracy of the combined algorithm is 88.70% on Amazon products reviews.
Suresh and Raj [13] exhibited a novel model for Twitter SA of a specific product and have analyzed the four usually used supervised ML algorithms (NB, Decision Tree J48, SVM and ME). Among those applied algorithms, results show that the J48 algorithm ended up being the most efficient ML algorithm, in contrast with the other three algorithms, with an overall accuracy of 92%.
Joshi and Vekariya [14] presented a practical approach to Twitter SA. The SVM algorithm with Part of Speech (POS) performs very well in SA with an accuracy of 92%.
Wawre and Deshmukh [15] compared two supervised ML algorithms (NB and SVM) for SA on the IMDB movie reviews dataset. The NB is 65.57% accurate compared with SVM with an accuracy of 45.71%.
Liu et al. [16] introduced a fundamental framework for SA on the Cornell movie review dataset utilizing NB with the Hadoop framework. The results show that the NB classifier could scale up enough. The accuracy achieved is below 82%.
In addition to machine learning based sentiment analysis, there are other approaches for SA that are based on lexicon. Many researchers applied sentiment analysis using a dictionary or corpus [6,7].

3. Datasets

Four different datasets were examined—the IMDB dataset [17], the Cornell dataset [18], the Amazon products dataset [19], and the Twitter dataset [20,21]. All these English reviews datasets are balanced and only contain two sentiment classes, which are positive and negative sentiments.
The first dataset, IMDB movie review, was initially used by Reference [22], then it was used and expanded widely as a benchmark dataset. The polarity dataset contains 12,500 positive and 12,500 negative processed reviews of movies, which were extracted from the internet movie database with an average of 30 sentences in each document.
The second data set is also a movie reviews dataset collected from Cornell movie reviews [23]. It includes 1000 positive and 1000 negative movie reviews. The number of positive words is 372,016 while the number of the distinct positive words is 29,693. The number of negative words is 330,463 while the number of the distinct negative words is 27,749.
The third dataset is collected from Amazon product reviews. The dataset has 1000 reviews divided into 500 positive and 500 negative. This dataset contains 981 distinct positive words and 1125 distinct negative words out of a total number of 5180 words.
Finally, the last dataset used is a Twitter dataset. It contains more than 1,500,000 processed tweets. However, in this research only 150,000 tweets are used for training and testing. The characteristics of used datasets can be illustrated in Table 1.

4. The Proposed Methodology

In this research, experiments are implemented with respect to binary SC, since this classification is important for many users who want to make a decision either to buy a product or not, watch a movie or not and so on. The proposed methodology for SA is a five-step process. In the first step, a dataset is selected from among the four different datasets. Pre-processing is performed in the second step, while the third step involves the FE algorithms that are applied on the selected dataset. Next, all ML algorithms are trained. Finally, the different ML algorithms are evaluated using 10-fold. The proposed methodology is illustrated in Figure 1.

4.1. Datasets Pre-Processing

The reviews datasets contain a lot of feedback and opinions which are expressed in various ways by clients. The four datasets utilized in this work are already labeled. Labeled datasets have a negative and positive polarity. The raw data having polarity is extremely susceptible to inconsistency, irregularity and redundancy. The structure of the data influences the results. To enhance the quality and performance of the classification process, the raw data needs to be pre-processed [24]. The pre-processing task deals with the preparation process that removes the repetitive words, non-English characters and punctuations. It enhances the proficiency and adeptness of the data. It includes removing non-English letters, tokenizing, removing stop words, removing repeated characters, removing URLs and user mentions, removing hashtags and retweets for the Twitter dataset, and handling emoticons [25,26].

4.2. Feature Extraction

In order to apply ML algorithms to the SA datasets, it is essential to extract confident features from the textual content that lead to a successful correct classification. The original textual content data are typically presented as an element of a Feature Set (FS), FS = (feature 1, feature 2 … feature n). In this research, two FE algorithms are applied, these are Term Frequency–Inverse Document Frequency (TF–IDF) and N-gram.

4.2.1. Term Frequency–Inverse Document Frequency Algorithm

The Term Frequency–Inverse Document Frequency (TF–IDF) algorithm is a regular measurement utilized as a part of the textual content classification framework. TF–IDF contains two factors—term frequency and inverse document frequency. Term frequency is exposed through the basic monitoring of the frequency of a given expression that has occurred in a given document. The inverse document frequency is calculated by dividing the number of all documents by the total number of documents that a given word is stated in. When these factors are multiplied together, the output score is the value that is the highest for words that appear frequently in documents and lowest for terms that appear frequently in each document. This allows us to find terms that are significant and weighty in a document [27].

4.2.2. N-Gram Algorithm

N-gram would fit for capturing textual context to some scope and is broadly used in NLP tasks. Whether to apply a higher order of n-gram is beneficial or not can be debated. Many researchers say that the unigram performs better than the bigram in classifying movie reviews by sentiment polarity, however different analysts and researchers found that in the different reviews dataset, bigrams and trigrams outperform unigrams [28].

4.3. Machine Learning Classification

In this research, different ML algorithms are applied to four different datasets to determine their efficiency and applicability for text classification and compare their evaluation accuracies [29,30,31]. The different ML algorithms are NB, SGD, SVM, Passive Aggressive (PA), Maximum Entropy, Adaptive Boosting (AdaBoost), Multinomial Naïve Bayes (MNB), Bernoulli Naïve Bayes (BNB), Ridge Regression (RR) and Logistic Regression (LR). The motive behind utilizing such algorithms is their viable capability to manage and deal with textual categorizations, in which the quantity of features is very extensive. The experiments have been conducted using Python 3.6 libraries. The two Python libraries used for the experiments are Scikit-learn [32] and Natural Language Tool Kit (NLTK) [33]. These libraries are free and grant researchers the ability to employ ML algorithms.

4.4. Evaluation

K-fold-cross-validation is conducted in the experiments of various ML algorithms. In this research the 10-fold cross validation is used to evaluate the ML algorithms’ performance [34]. The confusion matrix of the evaluation metrics is shown in Figure 2 where tPR stands for true positive review, tNR stands for true negative review, fPR stands for false positive review, and fNR stands for false negative review.
The Precision (Prc.), Recall (Rcl.), Accuracy (Acc.) and F-score (F-s) are calculated to measure the performance of the applied algorithms. The equations of Prc., Rcl., Acc. and F-s are defined in Equations (1)–(4).
Prc . = t P R t P R + f P R
Rcl . = t P R t P R + f N R
Acc . = No .   of   Correctly   Classified   Reviews Total   No .   of   Reviews
F-s = 2 × Prc . × Rcl . Prc . + Rcl .

5. Results and Discussion

The comparative analysis of results obtained by the proposed methodology using four different datasets, n-gram and TF–IDF as FE is demonstrated in Table 2.
From the experiments illustrated in Table 2, we recognized that the FE methods had an impact on the performance of any classifier. PA and RR with unigram, bigram or TF–IDF outperformed other algorithms on different datasets with an accuracy above 96%.
The top five accuracies of the results obtained by the proposed methodology using four different datasets, n-gram and TF–IDF as FE algorithms is demonstrated in Figure 3.
Seen in Figure 3, the top accuracies for the for IMDB dataset were for PA, RR, LR, NB and MNB. We noticed that the bigram performed the best with all ML algorithms, however, the unigram also received high accuracies. The trigram did not work very well with the IMDB dataset. In the Amazon products dataset we noticed that PA, RR, SVM, AdaBoost and LR achieved the highest accuracies. Using unigram or TF–IDF gave an accuracy above 80%, while trigram was the worst. The highest accuracies on Cornell movies dataset were for PA, RR, LR, SVM, and AdaBoost. Unigram and TF–IDF outperform the other FE methods. Trigram gave the lowest accuracies with most of ML algorithms. In the Twitter dataset, PA, RR, BNB, LR, and MNB achieved the highest accuracies. The trigram achieved the lowest accuracies among the different ML algorithms.
The top five precisions of the results obtained by the proposed methodology using four different datasets, n-gram and TF–IDF as FE algorithms is demonstrated in Figure 4.
Seen in Figure 4, the top precisions for the IMDB dataset were for PA, RR, LR, MNB, and ME. We noticed that the bigram performed the best with all ML algorithms, however, unigram also had a high precision. On Amazon products dataset we noticed that PA, RR, AdaBoost, SVM, and LR achieved the highest precision with using unigram or TF–IDF as FE methods. The highest precision values on Cornell movies dataset were for PA, RR, AdaBoost, LR, and SVM. Unigram and TF–IDF outperformed the other FE methods. On the Twitter Dataset, PA, RR, BNB, MNB, and LR achieved the highest precision. Trigram achieved the lowest precision among the different ML algorithms.
The top five show the results obtained by the proposed methodology using four different datasets, n-gram and TF–IDF as FE algorithms, this is demonstrated in Figure 5.
As seen in Figure 5 the top recall values for the IMDB dataset were for PA, RR, NB, LR and MNB. We noticed that n-gram beat the TF-IDF performance with all ML algorithms. On Amazon products dataset we noticed that PA, RR, AdaBoost, LR, and SVM achieved the highest recall values with using Unigram or TF-IDF as FE methods. The highest recall values on Cornell movies dataset were for PA, RR, LR, SVM, and SGD. Unigram and TF-IDF outperformed the other FE methods. On the Twitter dataset, PA, RR, BNB, MNB, and LR achieved the highest recall. Trigram achieved the lowest recall over different ML algorithms.
The top five f-score of the results obtained by the proposed methodology using four different datasets, n-gram and TF-IDF as FE algorithms is demonstrated in Figure 6.
As seen in Figure 6, the top f-score values for the IMDB dataset were for PA, RR, LR, MNB and SGD. We noticed that unigram, bigram and TF-IDF performed better than trigram. On the Amazon products dataset we noticed that PA, RR, AdaBoost, LR, and SVM achieved the highest f-score with using unigram or T-IDF as FE methods. The highest f-score values on Cornell movies dataset were for PA, RR, LR, SVM, and SGD. Unigram and TF–IDF outperformed the other FE methods. On the Twitter dataset, PA, RR, BNB, MNB, and LR achieved the highest f-score. Trigram achieved the lowest f-score among the different ML algorithms.

6. Conclusions and Future Work

In this research, ten different ML algorithms—NB, SGD, SVM, PA, ME, AdaBoost, MNB, BNB, RR and LR with two FE algorithms (n-gram and TF–IDF)—have been implemented on four SA datasets. The four reviews datasets are IMDB, Cornell movies, Amazon and Twitter, which have a different number of reviews each. The performance of the PA and RR with different FE algorithms on various datasets is the best among other algorithms as they give the highest accuracies in a range between 87% and 99.96%. Of the other tested algorithms, LR and SVM also promise an acceptable and convenient performance.
Some of the difficulties of sentiment analysis could be utilized as further extensions in the future of this research. The future research will focus on the detection of sarcasm and applying sentiment analysis to more domains such as YouTube, Yelp, Facebook, and cross-domains.

Author Contributions

The Conceptualization, D.G. and M.A.; Methodology, D.G.; Software, D.G.; Validation, D.G., M.A., E.-S.M.E.-H. and A.-B.M.S.; Formal Analysis, D.G. and M.A.; Investigation, D.G.; Resources, D.G.; Data Curation, D.G.; Writing-Original Draft Preparation, D.G.; Writing-Review & Editing, D.G., M.A., E.-S.M.E.-H. and A.-B.M.S.; Supervision, M.A., E.-S.M.E.-H. and A.-B.M.S.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gamal, D.; Alfonse, M.; El-Horbaty, E.S.; Salem, A.B. A comparative study on opinion mining algorithms of social media statuses. In Proceedings of the Intelligent Computing and Information Systems (ICICIS), Cairo, Egypt, 5–7 December 2017; pp. 385–390. [Google Scholar]
  2. Petz, G.; Karpowicz, M.; Fürschuß, H.; Auinger, A.; Stříteský, V.; Holzinger, A. Opinion mining on the web 2.0—Characteristics of user generated content and their impacts. In Lecture Notes in Computer Science LNCS 7947; Springer: Berlin/Heidelberg, Germany, 2013; pp. 35–46. [Google Scholar] [CrossRef]
  3. Zhang, Z.; Ye, Q.; Zhang, Z.; Li, Y. Sentiment classification of Internet resturant reviews written in Catonese. Expert Syst. Appl. 2011, 38, 7674–7682. [Google Scholar] [CrossRef]
  4. Petz, G.; Karpowicz, M.; Fürschuß, H.; Auinger, A.; Stříteský, V.; Holzinger, A. Computational approaches for mining user’s opinions on the web 2.0. Inf. Process. Manag. 2015, 51, 510–519. [Google Scholar] [CrossRef]
  5. Tripathy, A.; Agrawal, A.; Rath, S.K. Classification of sentiment reviews using n-gram machine learning approach. Expert Syst. Appl. 2016, 57, 117–126. [Google Scholar] [CrossRef]
  6. Khoo, C.S.; Johnkhan, S.B. Lexicon-based sentiment analysis: Comparative evaluation of six sentiment lexicons. J. Inf. Sci. 2018, 44, 491–511. [Google Scholar] [CrossRef]
  7. Dey, L.; Haque, S.M. Opinion mining from noisy text data. Int. J. Doc. Anal. Recognit. IJDAR 2009, 12, 205–226. [Google Scholar] [CrossRef]
  8. Bouazizi, M.; Ohtsuki, T. Sentiment analysis: From binary to multi-class classification: A pattern-based approach for multi-class sentiment analysis in Twitter. In Proceedings of the IEEE International Conference Communications (ICC), Kuala Lumpur, Malaysia, 22–27 May 2016; pp. 1–6. [Google Scholar]
  9. Barnaghi, P.; Ghaffari, P.; Breslin, J.G. Opinion mining and sentiment polarity on twitter and correlation between events and sentiment. In Proceedings of the Second international Conference Big Data Computing Service and Applications (BigDataService), Oxford, UK, 29 March–1 April 2016; pp. 52–57. [Google Scholar]
  10. Liu, S.M.; Chen, J.-H. A multi-label classification based approach for sentiment classification. Int. J. Expert Syst. Appl. 2015, 42, 1083–1093. [Google Scholar] [CrossRef]
  11. Joshi, N.S.; Itkat, S.A. A survey on feature level sentiment analysis. Int. J. Comput. Sci. Inf. Technol. 2014, 5, 5422–5425. [Google Scholar]
  12. Deng, Z.-H.; Luo, K.-H.; Yu, H.-L. A study of supervised term weighting scheme for sentiment analysis. Expert Syst. Appl. 2014, 41, 3506–3513. [Google Scholar] [CrossRef]
  13. Hima, S.; Gladston, R.S. Analysis of machine learning techniques for opinion mining. Int. J. Adv. Res. 2015, 3, 375–381. [Google Scholar]
  14. Joshi, V.C.; Vekariya, V.M. An approach to sentiment analysis on Gujarati tweets. Int. J. Adv. Comput. Sci. Technol. 2017, 10, 1487–1493. [Google Scholar]
  15. Liu, B. Sentiment analysis and subjectivity. Int. J. Handb. Nat. Lang. Process. 2010, 2, 627–666. [Google Scholar]
  16. Wawre, S.V.; Deshmukh, S.N. Sentiment classification using machine learning algorithms. Int. J. Sci. Res. IJSR 2016, 5, 1–3. [Google Scholar]
  17. Maas, A.L.; Daly, R.E.; Pham, P.T.; Huang, D.; Ng, A.Y.; Potts, C. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Portland, OR, USA, 19–24 June 2011. [Google Scholar]
  18. Movie Review Data. Available online: http://www.cs.cornell.edu/people/pabo/movie-review-data/ (accessed on 2 August 2018).
  19. Kotzias, D.; Denil, M.; de Freitas, N.; Smyth, P. From group to individual labels using deep features. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Sydney, Australia, 10–13 August 2015; pp. 597–606. [Google Scholar]
  20. Twitter Sentiment Analysis Training Corpus (Dataset). Available online: http://thinknook.com/twitter-sentiment-analysis-training-corpus-dataset-2012-09-22/ (accessed on 2 August 2018).
  21. The MIT License (MIT). Available online: http://vineetdhanawat.mit-license.org/ (accessed on 2 August 2018).
  22. Pang, B.; Lee, L.; Vaithyanathan, S. Thumbs up? Sentiment classification using machine learning techniques. In Proceedings of the Association for Computational Linguistics (ACL)-02 Conference on Empirical Methods in Natural Language Processing, Stroudsburg, PA, USA, 6–7 July 2002; Volume 10, pp. 79–86. [Google Scholar]
  23. Pang, B.; Lee, L. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. In Proceedings of the 42nd Annual Meeting on Association for Computational Linguistics, Barcelona, Spain, 21–26 July 2004. [Google Scholar]
  24. Derczynski, L.; Maynard, D.; Aswani, N.; Bontcheva, K. Microblog-genre noise and impact on semantic annotation accuracy. In Proceedings of the 24th ACM Conference on Hypertext and Social Media, Paris, France, 1–3 May 2013; ACM: New York, NY, USA, 2013; pp. 21–30. [Google Scholar] [Green Version]
  25. Petz, G.; Karpowicz, M.; Fürschuß, H.; Auinger, A.; Winkler, S.M.; Schaller, S.; Holzinger, A. On text preprocessing for opinion mining outside of laboratory environments. In Active Media Technology, Lecture Notes in Computer Science, LNCS 7669; Huang, R., Ghorbani, A., Pasi, G., Yamaguchi, T., Yen, N., Jin, B., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 618–629. [Google Scholar] [CrossRef]
  26. Derczynski, L.; Ritter, A.; Clark, S.; Bontcheva, K. Twitter part-of-speech tagging for all: Overcoming sparse and noisy data. In Proceedings of the International Conference Recent Advances in Natural Language Processing RANLP 2013, Hissar, Bulgaria, 7–13 September 2013; pp. 198–206. [Google Scholar]
  27. O’Keefe, T.; Koprinska, I. Feature selection and weighting methods in sentiment analysis. In Proceedings of the 14th Australasian Document Computing Symposium, Sydney, Australia, 4 December 2009. [Google Scholar]
  28. Tamilselvi, A.; ParveenTaj, M. Sentiment analysis of micro blogs using opinion mining classification algorithm. Int. J. Sci. Res. IJSR 2013, 2, 196–202. [Google Scholar]
  29. Kao, A.; Poteet, S.R. (Eds.) Natural Language Processing and Text Mining; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
  30. Aggarwal, C.C.; Zhai, C. (Eds.) Mining Text Data; Springer: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
  31. Srivastava, A.N.; Sahami, M. Text Mining: Classification, Clustering, and Applications; (Chapman and Hall/CRC): The CRC Press: Boca Raton, FL, USA, 2009. [Google Scholar]
  32. Scikit-Learn Machine Learning in Python. Available online: https://scikit-learn.org/ (accessed on 17 July 2018).
  33. Natural Language Toolkit. Available online: https://www.nltk.org/ (accessed on 17 July 2018).
  34. Wan, Y.; Gao, Q. An ensemble sentiment classification system of twitter data for airline services analysis. In Proceedings of the International Conference on Data Mining Workshops (ICDMW), Atlantic City, NJ, USA, 14–17 November 2015; pp. 1318–1325. [Google Scholar]
Figure 1. The proposed methodology.
Figure 1. The proposed methodology.
Make 01 00014 g001
Figure 2. The confusion matrix.
Figure 2. The confusion matrix.
Make 01 00014 g002
Figure 3. Top five accuracies on different datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Figure 3. Top five accuracies on different datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Make 01 00014 g003
Figure 4. Top five precision on different datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Figure 4. Top five precision on different datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Make 01 00014 g004
Figure 5. Top Five Recall on Different Datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Figure 5. Top Five Recall on Different Datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Make 01 00014 g005
Figure 6. Top five F-score on different datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Figure 6. Top five F-score on different datasets: (a) IMDB (b) Amazon (c) Cornell Movies (d) Twitter.
Make 01 00014 g006
Table 1. Characteristics of different datasets.
Table 1. Characteristics of different datasets.
DatasetIMDBCornell MoviesAmazon Tweets
Term
Positive12,500100050075 K
Negative12,500100050075 K
Total25 K20001000150 K
Table 2. The comparison of various machine learning (ML) classifiers’ performance using different features.
Table 2. The comparison of various machine learning (ML) classifiers’ performance using different features.
ML ClassifierDatasetIMDBCornell MoviesAmazonTwitter
Feature ExtractionUnigramBigramTrigramTF-IDFUnigramBigramTrigramTF-IDFUnigramBigramTrigramTF-IDFUnigramBigramTrigramTF-IDF
NBAcc.85.7687.5679.1665.5669.7660.7670.3652.4679.6658.6650.5667.0674.6665.9653.7670.16
Prc.85.9687.5679.1665.9678.5670.7670.3652.1679.6667.3664.6667.6674.8666.4660.9670.36
Rcl.85.7687.5679.1665.5669.7662.3670.2652.1679.6660.7652.2666.9674.6665.9654.1670.16
F-S85.8687.5679.1665.7673.8666.2670.3652.1679.6663.8657.8667.3674.7666.2657.3670.26
BNBAcc.86.1683.6662.5684.8678.4661.4650.2679.5679.4662.4650.2680.2675.2666.4653.9675.36
Prc.85.0685.5676.8685.1679.8673.6645.0681.1679.4671.0664.6680.6675.2667.3661.6675.36
Rcl.84.7683.6662.6684.8678.4662.8650.1679.5679.6663.7651.7680.3675.2666.4653.9675.36
F-S84.8684.5668.9684.9679.1667.8647.4680.3679.5667.1657.5680.5675.2666.8657.5675.36
MNBAcc.86.1687.5679.0685.4682.0662.2670.2681.6679.4659.6650.5679.0675.2666.2653.7674.26
Prc.86.2687.5679.2685.4681.9673.8670.3681.6679.5668.0664.6679.5675.3666.8660.8674.26
Rcl.86.1687.5679.1685.4682.0663.9670.2681.6679.4661.7652.2679.1675.2666.2654.1674.26
F-S86.2687.6679.1685.4682.0668.5670.3681.6679.5664.7657.8679.3675.3666.5657.2674.26
AdaBoostAcc.80.3665.2657.9680.4683.0664.0657.9684.4683.5663.7655.7683.2664.4652.7651.1664.46
Prc.80.5672.8668.2680.5683.0677.8674.1684.4684.9677.7676.4684.6664.6667.8662.6669.66
Rcl.80.3665.2657.9680.3683.0664.0657.9684.4683.5663.9655.7683.2664.4652.7651.1664.46
F-S80.4668.7662.7680.4683.0670.3665.0684.4684.2670.1664.4683.9666.9659.3656.3666.96
MEAcc.85.6687.1678.5664.3668.1657.9669.5652.3677.2656.7651.6664.8674.7665.9653.8670.46
Prc.85.8687.2678.5664.8677.7670.0669.7652.3677.8667.7664.1667.4674.9666.5661.3670.56
Rcl.85.6687.1678.5664.3668.5658.0669.5652.3677.2656.7651.6664.8674.7665.9653.8670.46
F-S85.7687.2678.5664.5672.8663.4669.6652.3677.5661.7657.2666.1674.8666.2657.3670.46
SGDAcc.86.1684.9674.2685.5683.6667.0667.8683.4679.3667.2651.3678.8674.9665.6652.9673.16
Prc.86.1684.9675.6685.6683.7674.0667.9683.5679.2674.3664.0679.0675.1666.4663.2673.16
Rcl.86.1684.9674.2685.5683.7667.1667.8683.4679.1667.5651.5678.7674.9665.6652.9673.16
F-S86.1684.9674.9685.6683.7670.4667.8683.5679.2670.7657.1678.9675.0666.0657.6673.16
SVMAcc.85.7685.2673.3684.5685.5667.2653.5684.1681.3666.7651.6681.1673.6664.8653.8671.46
Prc.85.7685.2674.3684.5685.5674.0672.3684.1681.3673.7664.1681.3673.6665.3660.9671.46
Rcl.85.7685.2673.2684.5685.5667.3653.5684.1681.5667.0651.6681.0673.6664.8653.8671.46
F-S85.7685.2673.8684.5685.5670.5661.5684.1681.4670.2657.2681.2673.6665.1657.1671.46
LRAcc.87.4685.2672.1686.5686.4667.4655.3685.6680.8667.6651.4681.5675.5665.8653.9674.06
Prc.87.5685.3673.6686.5686.4672.9671.0685.6681.1673.1664.0681.7675.5666.4661.0674.06
Rcl.87.4685.2672.1686.5686.4667.5655.4685.6681.0667.9651.6681.5675.5665.8653.9674.06
F-S87.5685.3672.9686.5686.4670.1662.2685.6681.0670.4657.1681.6675.5666.1657.2674.06
PAAcc.99.9699.8699.8699.9699.9696.7699.9699.9699.8696.7687.7699.7694.1699.2696.8692.96
Prc.99.9699.8699.8699.9699.9696.9699.9699.9699.7696.9690.2699.7694.1699.2697.0692.96
Rcl.99.9699.8699.8699.9699.9696.8699.9699.9699.8696.8687.7699.7694.1699.2696.8692.96
F-S99.9699.8699.8699.9699.9696.9699.9699.9699.8696.8688.9699.7694.1699.2696.9692.96
RRAcc.99.1699.8699.8698.2699.9698.4699.9699.9699.3698.4689.2699.0693.4699.1696.8690.86
Prc.99.1699.8699.8698.2699.9698.5699.9699.9699.3698.4691.1699.0693.4699.1697.0690.96
Rcl.99.1699.8699.8698.2699.9698.4699.9699.9699.3698.4689.3699.0693.4699.1696.8690.86
F-S99.1699.8699.8698.2699.9698.4699.9699.9699.3698.4690.2699.0693.4699.1696.9690.96

Share and Cite

MDPI and ACS Style

Gamal, D.; Alfonse, M.; M. El-Horbaty, E.-S.; M. Salem, A.-B. Analysis of Machine Learning Algorithms for Opinion Mining in Different Domains. Mach. Learn. Knowl. Extr. 2019, 1, 224-234. https://doi.org/10.3390/make1010014

AMA Style

Gamal D, Alfonse M, M. El-Horbaty E-S, M. Salem A-B. Analysis of Machine Learning Algorithms for Opinion Mining in Different Domains. Machine Learning and Knowledge Extraction. 2019; 1(1):224-234. https://doi.org/10.3390/make1010014

Chicago/Turabian Style

Gamal, Donia, Marco Alfonse, El-Sayed M. El-Horbaty, and Abdel-Badeeh M. Salem. 2019. "Analysis of Machine Learning Algorithms for Opinion Mining in Different Domains" Machine Learning and Knowledge Extraction 1, no. 1: 224-234. https://doi.org/10.3390/make1010014

Article Metrics

Back to TopTop