Abstract
Sentiment analysis determines the sentiment or opinion of a given text. A sentiment analysis model can classify whether a given text data is positive or negative by extracting meaning from the natural language. The growth of social media such as Twitter, forum discussions and reviews, contributed to the huge data repository in digital form. Analyzing these huge data manually is very time consuming and challenging. Thus, applying machine learning techniques can automatically classify the sentiment effectively. This research compares the performance of five popular machine learning techniques for sentiment analysis namely, Support Vector Machine (SVM), Logistic Regression, Naïve Bayes, Random Forest and K-Nearest Neighbor using a publicly available dataset from kaggle.com. Their classification performances are compared based on accuracy and training time where fine tuning of some of the hyperparameters are per-formed to improve the accuracy. Experimental analysis indicates that SVM with linear kernel function produces the highest accuracy but a slower training time. On the other hand, Naïve Bayes requires the shortest training time but with a slightly lower accuracy compared to SVM.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Naresh, A., Venkata Krishna, P.: An efficient approach for sentiment analysis using machine learning algorithm. Evol. Intell. 14(2), 725–731 (2020). https://doi.org/10.1007/s12065-020-00429-1
Singh, J., Singh, G., Singh, R.: Optimization of sentiment analysis using machine learning classifiers. HCIS 7(1), 1–12 (2017). https://doi.org/10.1186/s13673-017-0116-3
Maskat, R., Faizzuddin Zainal, M., Ismail, N., et al.: Automatic labelling of malay cyberbullying twitter corpus using combinations of sentiment, emotion and toxicity polarities. In: ACM International Conference Proceedings Series (2020). https://doi.org/10.1145/3446132.3446412
Liu, B.: Sentiment Analysis and Opinion Mining: A Survey. Morgan & Claypool
Adam, N.L., Rosli, N.H., Cik Soh, S.: Sentiment analysis on movie review using Naïve Bayes. In: 2nd International Conference on Artificial Intelligence and Data Sciences (AiDAS2021), pp 1–6 (2021)
Wah, Y.B., Abdullah, N., Abdul-Rahman, S., Peng Tan, M.L.: Text mining and sentiment analysis on reviews of proton cars in Malaysia. Malaysian J. Sci. 37, 137–153 (2018). https://doi.org/10.22452/mjs.vol37no2.5
Mohamed Shuhidan, S., Hamidi, S.R., Kazemian, S., et al.: Sentiment analysis for financial news headlines using machine learning algorithm. Adv. Intell. Syst. Comput. 739, 64–72 (2018). https://doi.org/10.1007/978-981-10-8612-0_8
Das, S., Kolya, A.K.: Predicting the pandemic: sentiment evaluation and predictive analysis from large-scale tweets on Covid-19 by deep convolutional neural network. Evol Intell. (2021). https://doi.org/10.1007/s12065-021-00598-7
Ramya, B.N., Shetty, S.M., Amaresh, A.M., Rakshitha, R.: Smart simon bot with public sentiment analysis for novel Covid-19 tweets stratification. SN Comput. Sci. 2(3), 1–11 (2021). https://doi.org/10.1007/s42979-021-00625-5
Du, J., Xu, J., Song, H., et al.: Optimization on machine learning based approaches for sentiment analysis on HPV vaccines related tweets. J Biomed. Semant. 8, 1–7 (2017). https://doi.org/10.1186/s13326-017-0120-6
Shah, K., Patel, H., Sanghvi, D., Shah, M.: A comparative analysis of logistic regression, random forest and KNN models for the text classification. Augment. Hum. Res. 5(1), 1–16 (2020). https://doi.org/10.1007/s41133-020-00032-0
Kharde, V.A., Sonawane, S.S.: Sentiment analysis of twitter data: a survey of techniques. Int. J. Comput. Appl. 139, 5–15. (2016). https://doi.org/10.5120/ijca2016908625
Yuri, M.N., Mohd Rosli, M.: TelcoSentiment: sentiment analysis on mobile telecommunication services using Naive Bayes technique. In: 2nd International Conference on Information Security and Computer Technology (ICISCT2021), pp 1–8 (2021)
Yue, L., Chen, W., Zuo, W., Yin, M.: A survey of sentiment analysis on social media. Knowl. Inf. Syst. 60, 617–663 (2019). https://doi-org.ezaccess.library.uitm.edu.my/10.1007/s10115-018-1236-4
Singh, J., Singh, G., Singh, R.: A review of sentiment analysis techniques for opinionated web text. CSI Trans. ICT 4(2–4), 241–247 (2016). https://doi.org/10.1007/s40012-016-0107-y
Hemmatian, F., Sohrabi, M.K.: A survey on classification techniques for opinion mining and sentiment analysis. Artif. Intell. Rev. 52(3), 1495–1545 (2017). https://doi.org/10.1007/s10462-017-9599-6
Pisner, D.A., Schnyer, D.M.: Support vector machine. Mach. Learn., 101–121 (2020)
Al Omari, M., Al Hajj, M., Hammami, N., Sabra, A.: Sentiment classifier: logistic regression for arabic services ’ reviews in Lebanon. In: 2019 International Conference on Computer and Information Sciences (ICCIS), pp 1–5. IEEE , (2019)
Murphy, K.P.: Naive Bayes classifiers, pp. 1–8 (2006)
Breiman, L.: Random Forests. Mach. Learn. 45, 5–32 (2001)
Dey, L., Chakraborty, S., Biswas, A., et al.: Sentiment analysis of review datasets using Naïve Bayes’ and K-NN classifier. Int. J. Inf. Eng. Electron Bus. 8, 54–62 (2016). https://doi.org/10.5815/ijieeb.2016.04.07
Jones, A.B.: Sentiment analysis of reviews: Text Pre-processing (2018). https://medium.com/@annabiancajones/sentiment-analysis-of-reviews-text-pre-processing-6359343784fb
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Ahmad Hapez, M.H.I., Adam, N.L., Ibrahim, Z. (2021). Performance Analysis of Machine Learning Techniques for Sentiment Analysis. In: Badioze Zaman, H., et al. Advances in Visual Informatics. IVIC 2021. Lecture Notes in Computer Science(), vol 13051. Springer, Cham. https://doi.org/10.1007/978-3-030-90235-3_18
Download citation
DOI: https://doi.org/10.1007/978-3-030-90235-3_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-90234-6
Online ISBN: 978-3-030-90235-3
eBook Packages: Computer ScienceComputer Science (R0)