An Approach to Integrating Sentiment Analysis into Recommender Systems
<p>Taxonomy of sentiment analysis techniques. Source: [<a href="#B6-sensors-21-05666" class="html-bibr">6</a>,<a href="#B19-sensors-21-05666" class="html-bibr">19</a>].</p> "> Figure 2
<p>Categories of deep neural network-based recommendation models [<a href="#B25-sensors-21-05666" class="html-bibr">25</a>]. Multilayer Perceptron (MLP); Auto Encoder (AE); Convolutional Neural Network (CNN); Recurrent Neural Network (RNN); Restricted Boltzmann Machine (RBM); Neural Autoregressive Distribution Estimation (NADE); Adversarial Networks (AN); Attentional Models (AM); Deep Reinforcement Learning (DRL).</p> "> Figure 3
<p>An architecture application in a recommender system.</p> "> Figure 4
<p>Process of hybrid methodology for sentiment analysis.</p> "> Figure 5
<p>Sentiment performance of hybrid deep-learning models using BERT.</p> "> Figure 6
<p>MAE measures comparison for different types of method and datasets using L-CNN sentiment model.</p> "> Figure 7
<p>RMSE measures the comparison for different types of methods and datasets using L-CNN sentiment model.</p> "> Figure 8
<p>NMAE measures the comparison for different types of methods and datasets using L-CNN sentiment model.</p> "> Figure 9
<p>Comparison of the sentiment-based methods with the L-CNN model (<b>a</b>) and the C-LSTM (<b>b</b>) and <math display="inline"><semantics> <mi>β</mi> </semantics></math> = 0.3 against non-sentiment-based methods on Amazon Fine Foods Reviews.</p> "> Figure 10
<p>Comparison of the sentiment-based methods with the L-CNN model (<b>a</b>) and the C-LSTM (<b>b</b>) and <math display="inline"><semantics> <mi>β</mi> </semantics></math> = 0.3 against non-sentiment-based methods on Amazon Movie Reviews.</p> "> Figure 11
<p>MRR, MAP, and NDCG values without and with L-CNN sentiment model on Amazon Fine Foods Reviews with <math display="inline"><semantics> <mi>β</mi> </semantics></math> = 0.7.</p> "> Figure 12
<p>MRR, MAP, and NDCG values without and with C-LSTM sentiment model on Amazon Fine Foods Reviews with <math display="inline"><semantics> <mi>β</mi> </semantics></math> = 0.7.</p> ">
Abstract
:1. Introduction
2. Background and Related work
2.1. Sentiment Analysis
2.2. Recommender Systems
2.3. Related Work
3. Methodology
3.1. Input Data and Preprocessing
3.2. Conduct and Train Sentiment-Based Hybrid Deep-Learning Models
3.3. Proposed Recommendation Method
- p: Rating for user and item predicted by Matrix Factorization methods (SVD, SVD++, and NMF) without using sentiments.
- : Rating for user and item predicted by using the sentiment model.
- parameter used to adjust the importance of each term of the equation.
Algorithm 1. Rating prediction based on sentiment for user and item . | |
1. | Function sentiment_ratingPred (user , item ) { |
2. | //This function is used to obtain theterm of Equation (1) |
3. | //Step 1: |
4. | FOR each item in the training set: |
5. | IF user already rated item AND review score matches rating THEN |
6. | Add to list of items ; |
7. | //The result of this step is a set of m items |
8. | //Step 2: |
9. | FOR each user in the training set: |
10. | FOR each item in the set of items : |
11. | IF user already rated item AND user already rated item AND their review scores match ratings |
12. | Add user to list of users ; |
13. | //The results of this step is a set of n users |
14. | //Step 3: |
15. | IF length(U)>0 THEN |
16. | FOR each user in the set of user : |
17. | Compute = sim (user , user ) by applying cosine metric; |
18. | Add to ; |
19. | //The result is a set of n similarity values |
20. | Set the K value to select the K nearest neighbors using S; |
21. | Compute the predicted rating by applying the Equation (2); |
22. | |
23. | Return ; |
24. | ELSE |
25. | Return 0; |
26. | } |
4. Experiments and Results
4.1. Dataset
- Amazon Fine Foods Reviews comprise reviews of fine foods from Amazon [48]. Each review includes product and user information, as well as the rating, and the plaintext review given by each user to each product he/she rated. The data span a period of more than 10 years, including 568,454 reviews with 256,059 users and 74,258 products up to October 2012.
- Amazon Movie Reviews consists of movie reviews from Amazon [48]. Each review also includes product and user information, ratings, and plaintext reviews. It covers a period of more than 10 years as well, including 7,911,684 reviews with 889,176 users and 253,059 products up to October 2012.
4.2. Results and Discussion
- We presented and evaluated a recommendation approach that integrates sentiment analysis and collaborative filtering methods.
- Two datasets, Amazon Fine Foods Review and Amazon Movie Review, are used for evaluation. Each plaintext review is vectorized by using the pre-trained BERT model.
- Two hybrid sentiment classification models, CNN-LSTM and LSTM-CNN, are used for extracting sentiments from reviews, which are incorporated as implicit feedback into the recommender system models.
- We applied SVD, NMF, and SVD++ recommendation methods following the user-based CF approach.
- Accuracy, F-score, and AUC were computed for validating the sentiment classification models.
- The evaluation of the recommendation method was performed for rating prediction and top-N recommendation. RMSE, MAE, and NMAE were the metrics used in the first case, and MRR, MAP and NDCG were the metrics used in the second case.
- The sentiment-based proposal increased the recommendation reliability in comparison to traditional, rating-based recommendation methods on the two datasets.
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Dang, N.C.; Moreno-García, M.N.; De la Prieta, F. Sentiment analysis based on deep learning: A comparative study. Electronics 2020, 9, 483. [Google Scholar] [CrossRef] [Green Version]
- Preethi, G.; Krishna, P.V.; Obaidat, M.S.; Saritha, V.; Yenduri, S. Application of Deep Learning to Sentiment Analysis for Recommender System on Cloud. In Proceedings of the 2017 International Conference on Computer, Information and Telecommunication Systems (CITS), Dalian, China, 21–23 July 2017; IEEE: New York, NY, USA, 2017; pp. 93–97. [Google Scholar]
- Keenan, M.J.S. Advanced Positioning, Flow, and Sentiment Analysis in Commodity Markets: Bridging Fundamental and Technical Analysis, 2nd ed.; Wiley: Chichester, UK, 2018. [Google Scholar]
- Sánchez-Moreno, D.; Moreno-García, M.N.; Mobasher, B.; Sonboli, N.; Burke, R. Using Social Tag Embedding in a Collaborative Filtering Approach for Recommender Systems. In Proceedings of the 2020 IEEE/WIC/ACM International Joint Conference on Web Intelligence and Intelligent Agent Technology, Melbourne, Australia, 14–17 December 2020; IEEE: New York, NY, USA, 2021. [Google Scholar]
- Sánchez-Moreno, D.; Batista, V.F.L.; Vicente, M.D.M.; González, A.B.G.; Moreno-García, M.N. A session-based song recommendation approach involving user characterization along the play power-law distribution. Complexity 2020, 2020, 1–13. [Google Scholar] [CrossRef]
- Bhavitha, B.; Rodrigues, A.P.; Chiplunkar, N.N. Comparative Study of Machine Learning Techniques in Sentimental Analysis. In Proceedings of the 2017 International Conference on Inventive Communication and Computational Technologies (ICICCT), Coimbatore, India, 10–11 March 2017; IEEE: New York, NY, USA, 2017; pp. 216–221. [Google Scholar]
- Salas-Zárate, M.D.P.; Medina-Moreira, J.; Lagos-Ortiz, K.; Luna-Aveiga, H.; Rodriguez-Garcia, M.A.; Valencia-García, R. Sentiment analysis on tweets about diabetes: An aspect-level approach. Comput. Math. methods Med. 2017, 2017, 1–9. [Google Scholar] [CrossRef] [PubMed]
- Zhang, X.; Zheng, X. Comparison of Text Sentiment Analysis Based on Machine Learning. In Proceedings of the 2016 15th International Symposium on Parallel and Distributed Computing (ISPDC), Fuzhou, China, 8–10 July 2016; IEEE: New York, NY, USA, 2016; pp. 230–233. [Google Scholar]
- Pandey, A.C.; Rajpoot, D.S.; Saraswat, M. Twitter sentiment analysis using hybrid cuckoo search method. Inf. Process. Manag. 2017, 53, 764–779. [Google Scholar] [CrossRef]
- Xue, D.-X.; Zhang, R.; Feng, H.; Wang, Y.-L. CNN-SVM for microvascular morphological type recognition with data augmentation. J. Med Biol. Eng. 2016, 36, 755–764. [Google Scholar] [CrossRef] [Green Version]
- Elleuch, M.; Maalej, R.; Kherallah, M. A new design based-SVM of the CNN classifier architecture with dropout for offline Arabic handwritten recognition. Procedia Comput. Sci. 2016, 80, 1712–1723. [Google Scholar] [CrossRef] [Green Version]
- Tang, Y. Deep learning using linear support vector machines. arXiv 2013, arXiv:preprint/1306.0239. [Google Scholar]
- Chen, T.; Xu, R.; He, Y.; Wang, X. Improving sentiment analysis via sentence type classification using BiLSTM-CRF and CNN. Expert Syst. Appl. 2017, 72, 221–230. [Google Scholar] [CrossRef] [Green Version]
- Rehman, A.U.; Malik, A.K.; Raza, B.; Ali, W. A hybrid CNN-LSTM model for improving accuracy of movie reviews sentiment analysis. Multimed. Tools Appl. 2019, 78, 26597–26613. [Google Scholar] [CrossRef]
- Vo, Q.-H.; Nguyen, H.-T.; Le, B.; Nguyen, M.-L. Multi-Channel LSTM-CNN Model for Vietnamese Sentiment Analysis. In Proceedings of the 2017 9th International Conference on Knowledge and Systems Engineering (KSE), Hue, Vietnam, 19–21 October 2017; IEEE: New York, NY, USA, 2017; pp. 24–29. [Google Scholar]
- Martín, C.A.; Torres, J.M.; Aguilar, R.M.; Diaz, S. Using deep learning to predict sentiments: Case study in tourism. Complexity 2018, 2018, 1–9. [Google Scholar] [CrossRef] [Green Version]
- Hochreiter, S.; Schmidhuber, J. LSTM can solve hard long time lag problems. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, MA, USA, 3 December 1996; pp. 473–479. [Google Scholar]
- Yamashita, R.; Nishio, M.; Do, R.K.G.; Togashi, K. Convolutional neural networks: An overview and application in radiology. Insights Imaging 2018, 9, 611–629. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Medhat, W.; Hassan, A.; Korashy, H. Sentiment analysis algorithms and applications: A survey. Ain Shams Eng. J. 2014, 5, 1093–1113. [Google Scholar] [CrossRef] [Green Version]
- Lu, J.; Wu, D.; Mao, M.; Wang, W.; Zhang, G. Recommender system application developments: A survey. Decis. Support Syst. 2015, 74, 12–32. [Google Scholar] [CrossRef]
- Betru, B.T.; Onana, C.A.; Batchakui, B. A Survey of State-of-the-art: Deep Learning Methods on Recommender System. Int. J. Comput. Appl. 2017, 162, 17–22. [Google Scholar]
- Kardan, A.A.; Ebrahimi, M. A novel approach to hybrid recommendation systems based on association rules mining for content recommendation in asynchronous discussion groups. Inf. Sci. 2013, 219, 93–110. [Google Scholar] [CrossRef]
- Adomavicius, G.; Tuzhilin, A. Toward the next generation of recommender systems: A survey of the state-of-the-art and possible extensions. IEEE Trans. Knowl. Data Eng. 2005, 17, 734–749. [Google Scholar] [CrossRef]
- Schafer, J.B.; Frankowski, D.; Herlocker, J.; Sen, S. Collaborative filtering recommender systems. In The Adaptive Web; Springer: Berlin/Heidelberg, Germany, 2007; pp. 291–324. [Google Scholar]
- Zhang, S.; Yao, L.; Sun, A.; Tay, Y. Deep learning based recommender system: A survey and new perspectives. ACM Comput. Surv. 2019, 52, 1–38. [Google Scholar] [CrossRef] [Green Version]
- Wang, Y.; Wang, M.; Xu, W. A sentiment-enhanced hybrid recommender system for movie recommendation: A big data analytics framework. Wirel. Commun. Mob. Comput. 2018, 2018, 1–9. [Google Scholar] [CrossRef] [Green Version]
- Kumar, S.; De, K.; Roy, P.P. Movie recommendation system using sentiment analysis from microblogging data. IEEE Trans. Comput. Soc. Syst. 2020, 7, 915–923. [Google Scholar] [CrossRef]
- Rao, K.Y.; Murthy, G.; Adinarayana, S. Product recommendation system from users reviews using sentiment analysis. Int. J. Comput. Appl. 2017, 975, 8887. [Google Scholar]
- Gurini, D.F.; Gasparetti, F.; Micarelli, A.; Sansonetti, G. A Sentiment-Based Approach to Twitter User Recommendation. RSWeb@ RecSys 2013, 1066, 1–4. [Google Scholar]
- Osman, N.; Noah, S.; Darwich, M. Contextual sentiment based recommender system to provide recommendation in the electronic products domain. Int. J. Mach. Learn. Comput. 2019, 9, 425–431. [Google Scholar] [CrossRef]
- Contratres, F.G.; Alves-Souza, S.N.; Filgueiras, L.V.L.; DeSouza, L.S. Sentiment Analysis of Social Network Data for Cold-Start Relief in Recommender Systems. In Proceedings of the World Conference on Information Systems and Technologies, Naples, Italy, 27–29 March 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 122–132. [Google Scholar]
- Nabil, S.; Elbouhdidi, J.; Yassin, M. Recommendation System Based on Data Analysis-Application on Tweets Sentiment Analysis. In Proceedings of the 2018 IEEE 5th International Congress on Information Science and Technology (CiSt), Marrakech, Morocco, 21–27 October 2018; IEEE: Marrakech, Morocco, 2018; pp. 155–160. [Google Scholar]
- Ziani, A.; Azizi, N.; Schwab, D.; Aldwairi, M.; Chekkai, N.; Zenakhra, D.; Cheriguene, S. Recommender system through sentiment analysis. In Proceedings of the 2nd International Conference on Automatic Control, Telecommunications and Signals, Annaba, Algeria, 11–12 December 2017. [Google Scholar]
- Abbasi, F.; Khadivar, A.; Yazdinejad, M. A Grouping Hotel Recommender System Based on Deep Learning and Sentiment Analysis. J. Inf. Technol. Manag. 2019, 11, 59–78. [Google Scholar]
- Rosa, R.L.; Rodriguez, D.Z.; Bressan, G. Music recommendation system based on user’s sentiments extracted from social networks. IEEE Trans. Consum. Electron. 2015, 61, 359–367. [Google Scholar] [CrossRef]
- Osman, N.A.; Noah, S.A.M. Sentiment-Based Model for Recommender Systems. In Proceedings of the 2018 Fourth International Conference on Information Retrieval and Knowledge Management (CAMP), Kota Kinabalu, Malaysia, 26–28 March 2018; IEEE: Kota Kinabalu, Malaysia, 2018; pp. 1–6. [Google Scholar]
- Nouh, R.M.; Lee, H.-H.; Lee, W.-J.; Lee, J.-D. A smart recommender based on hybrid learning methods for personal well-being services. Sensors 2019, 19, 431. [Google Scholar] [CrossRef] [Green Version]
- Devipriya, K.; Prabha, D.; Pirya, V.; Sudhakar, S. Deep learning sentiment analysis for recommendations in social applications. Int. J. Sci. Technol. Res. 2020, 9, 3812–3815. [Google Scholar]
- Singh, V.K.; Mukherjee, M.; Mehta, G.K. Combining Collaborative Filtering and Sentiment Classification for Improved Movie Recommendations. In Proceedings of the International Workshop on Multi-disciplinary Trends in Artificial Intelligence, Hyderabad, India, 7–9 December 2011; Springer: Berlin/Heidelberg, Germany, 2011; pp. 38–50. [Google Scholar]
- Nimirthi, P.; Krishna, P.V.; Obaidat, M.S.; Saritha, V. A framework for sentiment analysis based recommender system for agriculture using deep learning approach. In Social Network Forensics, Cyber Security, and Machine Learning; Springer: Berlin/Heidelberg, Germany, 2019; pp. 59–66. [Google Scholar]
- Dessi, D.; Helaoui, R.; Kumar, V.; Recupero, D.R.; Riboni, D. Tf-IDF vs word embeddings for morbidity identification in clinical notes: An initial study. arXiv 2021, arXiv:preprint/09632. [Google Scholar]
- Kumar, V.; Recupero, D.R.; Riboni, D.; Helaoui, R. Ensembling classical machine learning and deep learning approaches for morbidity identification from clinical notes. IEEE Access 2020, 9, 7107–7126. [Google Scholar] [CrossRef]
- Mikolov, T.; Sutskever, I.; Chen, K.; Corrado, G.S.; Dean, J. Distributed representations of words and phrases and their compositionality. In Proceedings of the Advances in Neural Information Processing Systems, Lake Tahoe, NV, USA, 5–10 December 2013; pp. 3111–3119. [Google Scholar]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:preprint/04805. [Google Scholar]
- Making the Most of Your Colab Subscription. Available online: https://colab.research.google.com/notebooks/pro.ipynb (accessed on 22 January 2021).
- Keras: The Python Deep Learning API. Available online: https://keras.io/ (accessed on 10 December 2020).
- TensorFlow. Available online: https://www.tensorflow.org/ (accessed on 10 December 2020).
- McAuley, J.J.; Leskovec, J. From amateurs to connoisseurs: Modeling the evolution of user expertise through online reviews. In Proceedings of the 22nd International Conference on World Wide Web, Rio de Janeiro, Brazil, 13–17 May 2013; pp. 897–908. [Google Scholar]
# | Amazon Fine Foods Reviews | Amazon Movie Reviews |
---|---|---|
Number of reviews | 568,454 | 7,911,684 |
Number of users | 256,059 | 889,176 |
Number of products | 74,258 | 253,059 |
Users with > 50 reviews | 260 | 16,341 |
Average no. of words per review | 56 | 101 |
Timespan | October 1999–October 2012 | August 1997–October 2012 |
Measures | Amazon Fine Foods Reviews | Amazon Movie Reviews | ||
---|---|---|---|---|
L-CNN | C-LSTM | L-CNN | C-LSTM | |
Accuracy | 80.04% | 79.95% | 82.27% | 82.27% |
F-Score | 80.24% | 80.00% | 82.49% | 82.46% |
AUC | 84.22% | 84.36% | 86.07% | 86.17% |
# | Amazon Fine Foods Reviews | Amazon Movie Reviews | ||||
---|---|---|---|---|---|---|
SVD | NMF | SVD++ | SVD | NMF | SVD++ | |
Without sentiment | 0.9706 | 0.9608 | 0.9540 | 0.8644 | 0.8087 | 0.8266 |
With sentiment ( = 0.3) | 0.8365 | 0.8762 | 0.8263 | 0.5943 | 0.5936 | 0.5770 |
With sentiment ( = 0.5) | 0.8634 | 0.8846 | 0.8470 | 0.6268 | 0.5976 | 0.5959 |
With sentiment ( = 0.7) | 0.8933 | 0.8964 | 0.8707 | 0.6701 | 0.6125 | 0.6253 |
# | Amazon Fine Foods Reviews | Amazon Movie Reviews | ||||
---|---|---|---|---|---|---|
SVD | NMF | SVD++ | SVD | NMF | SVD++ | |
Without sentiment | 1.2076 | 1.2312 | 1.1831 | 0.9960 | 0.9464 | 0.9376 |
With sentiment ( = 0.3) | 1.1338 | 1.2103 | 1.1292 | 0.8732 | 0.9112 | 0.8577 |
With sentiment ( = 0.5) | 1.1442 | 1.2102 | 1.1356 | 0.8851 | 0.9041 | 0.8598 |
With sentiment ( = 0.7) | 1.1633 | 1.2150 | 1.1493 | 0.9166 | 0.9110 | 0.8791 |
# | Amazon Fine Foods Reviews | Amazon Movie Reviews | ||||
---|---|---|---|---|---|---|
SVD | NMF | SVD++ | SVD | NMF | SVD++ | |
Without sentiment | 0.2427 | 0.2402 | 0.2385 | 0.2161 | 0.2022 | 0.2066 |
With sentiment ( = 0.3) | 0.2091 | 0.2191 | 0.2066 | 0.1486 | 0.1484 | 0.1443 |
With sentiment ( = 0.5) | 0.2158 | 0.2211 | 0.2117 | 0.1567 | 0.1494 | 0.1490 |
With sentiment ( = 0.7) | 0.2233 | 0.2241 | 0.2177 | 0.1675 | 0.1531 | 0.1563 |
# | SVD | NMF | SVD++ | |||
---|---|---|---|---|---|---|
Without Sentiment | With Sentiment (β = 0.7) | Without Sentiment | With Sentiment (β = 0.7) | Without Sentiment | With Sentiment (β = 0.7) | |
MRR | 83.92% | 84.09% | 82.98% | 83.19% | 84.24% | 84.24% |
MAP | 73.06% | 73.67% | 72.97% | 73.26% | 73.48% | 73.82% |
NDCG | 86.53% | 86.78% | 86.67% | 86.84% | 86.84% | 86.89% |
# | SVD | NMF | SVD++ | |||
---|---|---|---|---|---|---|
Without Sentiment | With Sentiment (β = 0.7) | Without Sentiment | With Sentiment (β = 0.7) | Without Sentiment | With Sentiment (β = 0.7) | |
MRR | 83.92% | 84.16% | 82.98% | 83.23% | 84.24% | 84.33% |
MAP | 73.06% | 73.64% | 72.97% | 73.23% | 73.48% | 73.84% |
NDCG | 86.53% | 86.78% | 86.67% | 86.82% | 86.84% | 86.89% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dang, C.N.; Moreno-García, M.N.; Prieta, F.D.l. An Approach to Integrating Sentiment Analysis into Recommender Systems. Sensors 2021, 21, 5666. https://doi.org/10.3390/s21165666
Dang CN, Moreno-García MN, Prieta FDl. An Approach to Integrating Sentiment Analysis into Recommender Systems. Sensors. 2021; 21(16):5666. https://doi.org/10.3390/s21165666
Chicago/Turabian StyleDang, Cach N., María N. Moreno-García, and Fernando De la Prieta. 2021. "An Approach to Integrating Sentiment Analysis into Recommender Systems" Sensors 21, no. 16: 5666. https://doi.org/10.3390/s21165666
APA StyleDang, C. N., Moreno-García, M. N., & Prieta, F. D. l. (2021). An Approach to Integrating Sentiment Analysis into Recommender Systems. Sensors, 21(16), 5666. https://doi.org/10.3390/s21165666