Skip to main content

Sentiment Analysis by Using Supervised Machine Learning and Deep Learning Approaches

  • Conference paper
  • First Online:
Advances in Computational Collective Intelligence (ICCCI 2020)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1287))

Included in the following conference series:

Abstract

With the growth of online review sites, we can use the opportunity to find out what other people think. Sentiment analysis is a popular text classification task in the data mining domain. In this research, we develop a text classification machine learning solution that can classify customer reviews into positive or negative class by predicting the overall sentiment of the review text on a document level. For this purpose, we carry out the experiment with two approaches, i.e. traditional machine learning approach and deep learning. In the first approach, we utilize four traditional machine learning algorithms with TF-IDF model using n-gram approach. These classifiers are multinomial naive Bayes, logistic regression, k-nearest neighbour and random forest. Out of these four classifiers, logistic regression achieves the highest accuracy. The second approach is to utilize deep learning methodologies with the word2vec approach, for which we develop a sequential deep learning neural network. The accuracy we achieve with deep learning is much lower than our traditional machine learning approach. After finding out the best performing approach and the classifier, the next step of the work is to build our final model with logistic regression using some advanced machine learning methodologies, i.e. Synthetic Minority Over-sampling for data balancing issues, Shuffle Split cross-validation. The accuracy of the final logistic regression model is approximately 87% which is 3% higher from the initial experimentation. Our finding in this research work is that, in smaller dataset scenarios, traditional machine learning would outperform deep learning models in terms of accuracy and other evaluation metrics. Another finding in this work is, by addressing data balancing issues in the dataset the accuracy of the model can be improved.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Gupta, S.: Applications of sentiment analysis in business. https://blog.paralleldots.com/product/applications-of-sentiment-analysis-in-business. Accessed 25 Jan 2019

  2. Bhanot, K.: Why and what of machine learning? https://towardsdatascience.com/why-and-what-of-machine-learning-c0eda6ebe5b0. Accessed 26 Jan 2019

  3. Grossfeld, B.: A simple way to understand machine learning vs deep learning. https://www.zendesk.com/blog/machine-learning-and-deep-learning/. Accessed 27 Jan 2019

  4. Garbade, M.J.: A simple introduction to natural language processing. https://becominghuman.ai/a-simple-introduction-to-natural-language-processing-ea66a1747b32. Accessed 26 Jan 2019

  5. Sawakoshi, Y., Okada, M., Hashimoto, K.: An investigation of effectiveness of “opinion” and “fact” sentences for sentiment analysis of customer reviews. In: 2015 International Conference on Computer Application Technologies, pp. 98–102, August 2015. https://doi.org/10.1109/CCATS.2015.33

  6. Soni, S., Sharaff, A.: Sentiment analysis of customer reviews based on hidden Markov model. In: Proceedings of the 2015 International Conference on Advanced Research in Computer Science Engineering 38, Technology (ICARCSET 2015), ICARCSET 2015, pp. 12:1–12:5. ACM, New York (2015). ISBN 978-1-4503-3441-9. https://doi.org/10.1145/2743065.2743077

  7. Kumar, K.L.S., Desai, J., Majumdar, J.: Opinion mining and sentiment analysis on online customer review. In: 2016 IEEE International Conference on Computational Intelligence and Computing Research (ICCIC), pp. 1–4, December 2016. https://doi.org/10.1109/ICCIC.2016.7919584

  8. Sanghi, D.: Applying multinomial Naive Bayes to NLP problems. https://www.geeksforgeeks.org/applying-multinomial-naive-bayes-to-nlp-problems/. Accessed 29 Jan 2019

  9. Narkhede, S.: Understanding logistic regression. https://towardsdatascience.com/understanding-logistic-regression-9b02c2aec102. Accessed 30 Jan 2019

  10. Technopedia. K-nearest neighbor (K-NN). https://www.techopedia.com/definition/32066/k-nearest-neighbor-k-nn. Accessed 30 Jan 2019

  11. Donges, N.: The random forest algorithm. https://towardsdatascience.com/the-random-forest-algorithm-d457d499ffcd. Accessed 30 Jan 2019

  12. Heller, M.: What is keras? The deep neural network API explained. https://www.infoworld.com/article/3336192/what-is-keras-the-deep-neural-network-api-explained.html. Accessed 1 Feb 2019

  13. Prabowo, R., Thelwall, M.: Sentiment analysis: a combined approach. J. Informetrics 3(2) (2009)

    Google Scholar 

  14. Claudio, B., Tiberio, U., Marco, B., Del Bimbo, A.: A multimodal feature learning approach for sentiment analysis of social network multimedia. Multimedia Tools Appl. 75(5), 2507–2525 (2015). https://doi.org/10.1007/s11042-015-2646-x

  15. Heredia, B., Khoshgoftaar, T.M., Prusa, J., Crawford, M.: Cross-domain sentiment analysis: an empirical investigation. In: 2016 IEEE 17th International Conference on Information Reuse and Integration, p. 160165 (2016)

    Google Scholar 

  16. Haenlein, M., Kaplan, A.M.: An empirical analysis of attitudinal and behavioral reactions toward the abandonment of unprofitable customer relationships. J. Relatsh. Mark. 9(4), 200228 (2010)

    Google Scholar 

  17. Aydogan, E., Akcayol, M.A.: A comprehensive survey for sentiment analysis tasks using machine learning techniques. In: 2016 International Symposium on Innovations in Intelligent Systems and Applications, p. 17 (2016)

    Google Scholar 

  18. Day, M., Lee, C.: Deep Learning for Financial Sentiment Analysis on Finance News Providers, no. 1, pp. 1127–1134 (2016)

    Google Scholar 

  19. Vateekul, P., Koomsubha, T.: A Study of Sentiment Analysis Using Deep Learning Techniques on Thai Twitter Data (2016)

    Google Scholar 

  20. Zhang, Y., Er, M.J., Wang, N., Pratama, M., Venkatesan, R.: Sentiment Classification Using Comprehensive Attention Recurrent Models, pp. 1562–1569 (2016)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Doina Logofătu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Naeem, S., Logofătu, D., Muharemi, F. (2020). Sentiment Analysis by Using Supervised Machine Learning and Deep Learning Approaches. In: Hernes, M., Wojtkiewicz, K., Szczerbicki, E. (eds) Advances in Computational Collective Intelligence. ICCCI 2020. Communications in Computer and Information Science, vol 1287. Springer, Cham. https://doi.org/10.1007/978-3-030-63119-2_39

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-63119-2_39

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-63118-5

  • Online ISBN: 978-3-030-63119-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics