The unprecedented rise in the number of COVID-19 cases has drawn global attention, as it has caused an adverse impact on the lives of people all over the world. As of December 31, 2021, more than 2, 86, 901, 222 people have been infected with COVID-19. The rise in the number of COVID-19 cases and deaths across the world has caused fear, anxiety and depression among individuals. Social media is the most dominant tool that disturbed human life during this pandemic. Among the social media platforms, Twitter is one of the most prominent and trusted social media platforms. To control and monitor the COVID-19 infection, it is necessary to analyze the sentiments of people expressed on their social media platforms. In this study, we proposed a deep learning approach known as a long short-term memory (LSTM) model for the analysis of tweets related to COVID-19 as positive or negative sentiments. In addition, the proposed approach makes use of the firefly algorithm to enhance the overall performance of the model. Further, the performance of the proposed model, along with other state-of-the-art ensemble and machine learning models, has been evaluated by using performance metrics such as accuracy, precision, recall, the AUC-ROC and the F1-score. The experimental results reveal that the proposed LSTM + Firefly approach obtained a better accuracy of 99.59% when compared with the other state-of-the-art models.
Citation: H. Swapnarekha, Janmenjoy Nayak, H. S. Behera, Pandit Byomakesha Dash, Danilo Pelusi. An optimistic firefly algorithm-based deep learning approach for sentiment analysis of COVID-19 tweets[J]. Mathematical Biosciences and Engineering, 2023, 20(2): 2382-2407. doi: 10.3934/mbe.2023112
The unprecedented rise in the number of COVID-19 cases has drawn global attention, as it has caused an adverse impact on the lives of people all over the world. As of December 31, 2021, more than 2, 86, 901, 222 people have been infected with COVID-19. The rise in the number of COVID-19 cases and deaths across the world has caused fear, anxiety and depression among individuals. Social media is the most dominant tool that disturbed human life during this pandemic. Among the social media platforms, Twitter is one of the most prominent and trusted social media platforms. To control and monitor the COVID-19 infection, it is necessary to analyze the sentiments of people expressed on their social media platforms. In this study, we proposed a deep learning approach known as a long short-term memory (LSTM) model for the analysis of tweets related to COVID-19 as positive or negative sentiments. In addition, the proposed approach makes use of the firefly algorithm to enhance the overall performance of the model. Further, the performance of the proposed model, along with other state-of-the-art ensemble and machine learning models, has been evaluated by using performance metrics such as accuracy, precision, recall, the AUC-ROC and the F1-score. The experimental results reveal that the proposed LSTM + Firefly approach obtained a better accuracy of 99.59% when compared with the other state-of-the-art models.
[1] | Š. Lyócsa, E. Baumöhl, T. Výrost, P. Molnár, Fear of the coronavirus and the stock markets, Finance Res. Letters, 36 (2020), 101735. https://doi.org/10.1016/j.frl.2020.101735 doi: 10.1016/j.frl.2020.101735 |
[2] | K.-S. Kim, S.-C. J. Sin, E. Y. Yoo-Lee, Undergraduates' use of social media as information sources, Coll. Res. Libr., 75 (2014), 442–457. https://doi.org/10.5860/crl.75.4.442 doi: 10.5860/crl.75.4.442 |
[3] | K. Ali, H. Dong, A. Bouguettaya, A. Erradi, R. Hadjidj, Sentiment analysis as a service: A social media based sentiment analysis framework, 2017 IEEE International Conference on Web Services (ICWS), IEEE, (2017). https://doi.org/10.1109/ICWS.2017.79 |
[4] | R. Chunara, J. R. Andrews, J. S. Brownstein, Social and news media enable estimation of epidemiological patterns early in the 2010 Haitian cholera outbreak, Am. J. Trop. Med. Hyg., 86 (2012), 39. https://doi.org/10.4269/ajtmh.2012.11-0597 doi: 10.4269/ajtmh.2012.11-0597 |
[5] | M. S. Deiner, T. M. Lietman, S. D. McLeod, Surveillance tools emerging from search engines and social media data for determining eye disease patterns, JAMA Ophthalmol, 134 (2016), 1024–1030. https://doi.org/10.1001/jamaophthalmol.2016.2267 doi: 10.1001/jamaophthalmol.2016.2267 |
[6] | A. Joshi, R. Sparks, S. Karimi, S.-L. J. Yan, A. A. Chughtai, C. Paris, et al., Automated monitoring of tweets for early detection of the 2014 Ebola epidemic, PloS One, 15 (2020), e0230322. https://doi.org/10.1371/journal.pone.0230322 doi: 10.1371/journal.pone.0230322 |
[7] | O. B. Da'ar, F. Yunus, N. Md. Hossain, M. Househ, Impact of Twitter intensity, time, and location on message lapse of bluebird's pursuit of fleas in Madagascar, J. Infect. Public Health, 10 (2017), 396–402. https://doi.org/10.1016/j.jiph.2016.06.011 doi: 10.1016/j.jiph.2016.06.011 |
[8] | E. Diaz-Aviles, A. Stewart, Tracking twitter for epidemic intelligence: case study: Ehec/hus outbreak in Germany, 2011, Proceedings of the 4th annual ACM web science conference, (2012). https://doi.org/10.1145/2380718.2380730 |
[9] | L. Luo, Y. Wang, D. Y. Mo, Identifying COVID-19 personal health mentions from tweets using masked attention model, IEEE Access, (2022). https://doi.org/10.1109/ACCESS.2022.3179808 |
[10] | L. Luo, Y. Wang, H. Liu, COVID-19 personal health mention detection from tweets using dual convolutional neural network, Expert Syst. Appl., 200 (2022), 117139. https://doi.org/10.1016/j.eswa.2022.117139 doi: 10.1016/j.eswa.2022.117139 |
[11] | M. Paul, M. Dredze, You are what you tweet: Analyzing twitter for public health, Proceedings of the International AAAI Conference on Web and Social Media, 5 (2011). https://doi.org/10.1609/icwsm.v5i1.14137 |
[12] | M. Richey, A. Gonibeed, M. N. Ravishankar, The perils and promises of self-disclosure on social media, Inform. Syst. Front., 20 (2018), 425–437. https://doi.org/10.1007/s10796-017-9806-7 doi: 10.1007/s10796-017-9806-7 |
[13] | K. Crawford, Following you: Disciplines of listening in social media, Continuum, 23 (2009), 525–535. https://doi.org/10.1080/10304310903003270 doi: 10.1080/10304310903003270 |
[14] | W. Chung, S. He, D. Zeng, eMood: Modeling emotion for social media analytics on Ebola disease outbreak, (2015). |
[15] | K. Goldschmidt, The COVID-19 pandemic: Technology use to support the wellbeing of children, J. Pediat. Nurs., 53 (2020), 88. https://doi.org/10.1016/j.pedn.2020.04.013 doi: 10.1016/j.pedn.2020.04.013 |
[16] | R. Singh, R. Singh, A. Bhatia, Sentiment analysis using Machine Learning technique to predict outbreaks and epidemics, Int. J. Adv. Sci. Res., 3 (2018), 19–24. |
[17] | H. Zhao, Z. Liu, X. Yao, Q. Yang, A machine learning-based sentiment analysis of online product reviews with a novel term weighting and feature selection approach, Inform. Process. Manag., 58 (2021), 102656. https://doi.org/10.1016/j.ipm.2021.102656 doi: 10.1016/j.ipm.2021.102656 |
[18] | S. Naeem, W. K. Mashwan, A. Ali, M. I. Uddin, M. Mahmoud, F. Jamal, et al., Machine learning-based USD/PKR exchange rate forecasting using sentiment analysis of Twitter data, CMC-Comput. Mater. Cont., 67 (2021), 3451–3461. https://doi.org/10.32604/cmc.2021.015872 doi: 10.32604/cmc.2021.015872 |
[19] | D. Li, R. Rzepka, M. Ptaszynski, K. Araki, HEMOS: A novel deep learning-based fine-grained humor detecting method for sentiment analysis of social media, Inform. Process. Manag., 57 (2020), 102290. https://doi.org/10.1016/j.ipm.2020.102290 doi: 10.1016/j.ipm.2020.102290 |
[20] | A. R. Pathak, M. Pandey, S. Rautaray, Topic-level sentiment analysis of social media data using deep learning, Appl. Soft Comput., 108 (2021), 107440. https://doi.org/10.1016/j.asoc.2021.107440 doi: 10.1016/j.asoc.2021.107440 |
[21] | E. K. W. Leow, B. P. Nguyen, M. C. H. Chua, Robo-advisor using genetic algorithm and BERT sentiments from tweets for hybrid portfolio optimization, Expert Syst. Appl., 179 (2021), 115060. https://doi.org/10.1016/j.eswa.2021.115060 doi: 10.1016/j.eswa.2021.115060 |
[22] | T. Hu, S. Wang, B. She, M. Zhang, X. Huang, Y. Cui, et al., Human mobility data in the COVID-19 pandemic: Characteristics, applications, and challenges, Int. J. Digital Earth, 14 (2021), 1126–1147. https://doi.org/10.1080/17538947.2021.1952324 doi: 10.1080/17538947.2021.1952324 |
[23] | S. Li, C. H. Liu, Q. Lin, Q. Wen, L. Su, G. Huang, et al., Deep residual correction network for partial domain adaptation, IEEE Transact. Pattern Anal. Mach. Intell., 43 (2020), 2329–2344. https://doi.org/10.1109/TPAMI.2020.2964173 doi: 10.1109/TPAMI.2020.2964173 |
[24] | C. K. Pastor, Sentiment analysis of Filipinos and effects of extreme community quarantine due to coronavirus (COVID-19) Pandemic, Available at SSRN 3574385 (2020). https://doi.org/10.2139/ssrn.3574385 |
[25] | Md. S. A. Pran, Md. R. Bhuiyan, S. A. Hossain, S. Abujar, Analysis of Bangladeshi people's emotion during Covid-19 in social media using deep learning, 2020 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT), IEEE, (2020). https://doi.org/10.1109/ICCCNT49239.2020.9225500 |
[26] | S. Das, A. K. Kolya, Predicting the pandemic: sentiment evaluation and predictive analysis from large-scale tweets on Covid-19 by deep convolutional neural network, Evolut. Intell., (2021), 1–22. https://doi.org/10.1007/s12065-021-00598-7 |
[27] | H. Hosseini, B. Xiao, M. Jaiswal, R. Poovendran, On the limitation of convolutional neural networks in recognizing negative images, 2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA), IEEE, (2017). https://doi.org/10.1109/ICMLA.2017.0-136 |
[28] | J. Q. Zhao, X. L. Gui, X. J. Zhang, Deep convolution neural networks for twitter sentiment analysis, IEEE Access, 6 (2018), 23253–23260. https://doi.org/10.1109/ACCESS.2017.2776930 doi: 10.1109/ACCESS.2017.2776930 |
[29] | C. Singh, S. Wibowo, S. Grandhi, A deep learning approach for human face sentiment classification, 2021 21st ACIS International Winter Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD-Winter), IEEE, (2021). https://doi.org/10.1109/SNPDWinter52325.2021.00015 |
[30] | A. Abd-Alrazaq, D. Alhuwail, M. Househ, M. Hamdi, Z. Shah, Top concerns of tweeters during the COVID-19 pandemic: Infoveillance study, J. Med. Int. Res., 22 (2020), e19016. https://doi.org/10.2196/19016 doi: 10.2196/19016 |
[31] | H. Kaur, S. U. Ahsaan, B. Alankar, V. Chang, A proposed sentiment analysis deep learning algorithm for analyzing COVID-19 tweets, Inform. Syst. Front., (2021), 1–13. https://doi.org/10.1007/s10796-021-10135-7 |
[32] | M. E. Basiri, S. Nemati, M. Abdar, S. Asadi, U. RajendraAcharrya, A novel fusion-based deep learning model for sentiment analysis of COVID-19 tweets, Knowledge-Based Systems, 228 (2021), 107242. https://doi.org/10.1016/j.knosys.2021.107242 doi: 10.1016/j.knosys.2021.107242 |
[33] | M. M. Rahman, M. N. Islam, Exploring the performance of ensemble machine learning classifiers for sentiment analysis of covid-19 tweets, Sentimental Analysis and Deep Learning, Springer, Singapore, (2022), 383-396. https://doi.org/10.1007/978-981-16-5157-1_30 |
[34] | F. Rustam, M. Khalid, W. Aslam, V. Rupapara, A. Mehmood, G. S. Choi, A performance comparison of supervised machine learning models for Covid-19 tweets sentiment analysis, PLoS One, 16 (2021), e0245909. https://doi.org/10.1371/journal.pone.0245909 doi: 10.1371/journal.pone.0245909 |
[35] | D. S. Abdelminaam, F. H. Ismail, M. Taha, A. Taha, E. H. Houssein, A. Nabil, Coaid-deep: An optimized intelligent framework for automated detecting covid-19 misleading information on twitter, IEEE Access, 9 (2021), 27840–27867. https://doi.org/ 10.1109/ACCESS.2021.3058066 doi: 10.1109/ACCESS.2021.3058066 |
[36] | M. Wankhade, A. C. S. Rao, Opinion analysis and aspect understanding during covid-19 pandemic using BERT-Bi-LSTM ensemble method, Sci. Rep., 12 (2022), 1–15. https://doi.org/10.1038/s41598-022-21604-7 doi: 10.1038/s41598-022-21604-7 |
[37] | T.-H. Nguyen-Vo, Q. H. Trinh, L. Nguyen, T. T. T. Do, M. C. H. Chua, B. P. Nguyen, Predicting Antimalarial Activity in Natural Products Using Pretrained Bidirectional Encoder Representations from Transformers, J. Chem. Inform. Model., (2021). https://doi.org/10.1021/acs.jcim.1c00584 |
[38] | T.-H. Nguyen-Vo, Q. H. Trinh, L. Nguyen, P.-U. Nguyen-Hoang, S. Rahardja, B. P. Nguyen, iPromoter-Seqvec: Identifying promoters using bidirectional long short-term memory and sequence-embedded features, BMC Genom., 23 (2022), 1–12. https://doi.org/10.1186/s12864-022-08829-6 doi: 10.1186/s12864-022-08829-6 |
[39] | N. Chintalapudi, G. Battineni, F. Amenta, Sentimental analysis of COVID-19 tweets using deep learning models, Infect. Disease Rep., 13 (2021), 329–339. https://doi.org/10.3390/idr13020032 doi: 10.3390/idr13020032 |
[40] | C. Sitaula, A. Basnet, A. Mainali, T. B. Shahi, Deep learning-based methods for sentiment analysis on Nepali COVID-19-related tweets, Comput. Intell. Neurosci., 2021 (2021). https://doi.org/10.1155/2021/2158184 |
[41] | R. Chandra, A. Krishna, COVID-19 sentiment analysis via deep learning during the rise of novel cases, arXiv preprint arXiv: 2104.10662 (2021). https://doi.org/10.1371/journal.pone.0255615 |
[42] | M. Tripathi, Sentiment analysis of Nepali COVID 19 tweets using NBSVM and LSTM, J. Artif. Intell., 3 (2021), 151–168. https://doi.org/10.36548/jaicn.2021.3.001 doi: 10.36548/jaicn.2021.3.001 |
[43] | S. Malla, P. J. A. Alphonse, COVID-19 outbreak: An ensemble pre-trained deep learning model for detecting informative tweets, Appl. Soft Comput., 107 (2021), 107495. https://doi.org/10.1016/j.asoc.2021.107495 doi: 10.1016/j.asoc.2021.107495 |
[44] | S. Hochreiter, J. Schmidhuber, Long short-term memory, Neural Comput., 9 (1997), 1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735 |
[45] | X.-S Yang, Firefly algorithms for multimodal optimization, International symposium on stochastic algorithms, Springer, Berlin, Heidelberg, (2009). https://doi.org/10.1007/978-3-642-04944-6_14 |
[46] | I. Fister, I. FisterJr, X.-S Yang, J. Brestl, A comprehensive review of firefly algorithms, Swarm Evolution. Comput., 13 (2013), 34–46. https://doi.org/10.1016/j.swevo.2013.06.001 doi: 10.1016/j.swevo.2013.06.001 |
[47] | M. J. Kazemzadeh-Parsi, F Daneshmand, M. A. Ahmadfard, J. Adamowski, R. Martel, Optimal groundwater remediation design of pump and treat systems via a simulation–optimization approach and firefly algorithm, Eng. Optim., 47 (2015), 1–17. https://doi.org/10.1080/0305215X.2013858138 doi: 10.1080/0305215X.2013858138 |
[48] | M. K. Marichelvam, T. Prabaharan, M. Geetha, Firefly algorithm for flow shop optimization, Recent Advances in Swarm Intelligence and Evolutionary Computation, Springer, Cham, (2015), 225–243. https://doi.org/10.1007/978-3-319-13826-8_12 |
[49] | A. Chatterjee, G. K. Mahanti, A. Mahanti, Synthesis of thinned concentric ring array antenna in predefined phi‐planes using binary firefly and binary particle swarm optimization algorithm, Int. J. Numer. Model. Electr. Networks Dev. Fields, 28 (2015), 164–174. https://doi.org/10.1002/jnm.1994 doi: 10.1002/jnm.1994 |
[50] | C. Solano-Aragón, O. Castillo, Optimization of benchmark mathematical functions using the firefly algorithm with dynamic parameters, Fuzzy Logic Augmentation of Nature-Inspired Optimization Metaheuristics, Springer, Cham, (2015), 81–89. https://doi.org/10.1007/978-3-319-10960-2_5 |
[51] | X.-S. Yang, Chaos-enhanced firefly algorithm with automatic parameter tuning, Int. J. Swarm Intell. Res., 2 (2011), 1–11. |
[52] | IEEE DataPort. Available from: https://ieee-dataport.org/documents/ai-based-automated-extraction-entities-entity-categories-and-sentiments-covid-19-situation |
[53] | B. P. Nguyen, W.-L. Tay, C.-K. Chui, Robust biometric recognition from palm depth images for gloved hands, IEEE Transact. Human-Mach. Syst., 45 (2015), 799–804. https://doi.org/10.1109/THMS.2015.2453203 doi: 10.1109/THMS.2015.2453203 |