Tweet Prediction for Social Media using Machine Learning


  • Mohammed Fattah Department of Information Technology, College of Computer Sciences and Information Sciences, Majmaah University, Al Majmaah, 11952, Saudi Arabia
  • Mohd Anul Haq Department of Computer Science College of Computer Sciences and Information Sciences, Majmaah University, Al Majmaah, 11952, Saudi Arabia
Volume: 14 | Issue: 3 | Pages: 14698-14703 | June 2024 |


Tweet prediction plays a crucial role in sentiment analysis, trend forecasting, and user behavior analysis on social media platforms such as X (Twitter). This study delves into optimizing Machine Learning (ML) models for precise tweet prediction by capturing intricate dependencies and contextual nuances within tweets. Four prominent ML models, i.e. Logistic Regression (LR), XGBoost, Random Forest (RF), and Support Vector Machine (SVM) were utilized for disaster-related tweet prediction. Our models adeptly discern semantic meanings, sentiment, and pertinent context from tweets, ensuring robust predictive outcomes. The SVM model showed significantly higher performance with 82% accuracy and an F1 score of 81%, whereas LR, XGBoost, and RF achieved 79% accuracy with average F1-scores of 78%.


tweet prediction, emotion analysis, machine learning, hyperparameter tuning


Download data is not yet available.


M. A. Haq, M. A. R. Khan, and M. Alshehri, "Insider Threat Detection Based on NLP Word Embedding and Machine Learning," Intelligent Automation & Soft Computing, vol. 33, no. 1, pp. 619–635, Jan. 2022.

M. A. Haq, M. Abdul, and T. AL-Harbi, "Development of PCCNN-Based Network Intrusion Detection System for EDGE Computing," Computers, Materials & Continua, vol. 71, no. 1, pp. 1769–1788, 2021.

M. A. Haq, "DBoTPM: A Deep Neural Network-Based Botnet Prediction Model," Electronics, vol. 12, no. 5, Jan. 2023, Art. no. 1159.

M. A. Haq and M. Abdul, "DNNBoT: Deep Neural Network-Based Botnet Detection and Classification," Computers, Materials & Continua, vol. 71, no. 1, pp. 1729–1750, 2021.

M. A. Haq, "SMOTEDNN: A Novel Model for Air Pollution Forecasting and AQI Classification," Computers, Materials & Continua, vol. 71, no. 1, pp. 1403–1425, 2021.

M. A. Haq, "CDLSTM: A Novel Model for Climate Change Forecasting," Computers, Materials & Continua, vol. 71, no. 2, pp. 2363–2381, 2021.

M. A. Haq, A. K. Jilani, and P. Prabu, "Deep Learning Based Modeling of Groundwater Storage Change," Computers, Materials & Continua, vol. 70, no. 3, pp. 4599–4617, 2021.

M. A. Haq et al., "Analysis of environmental factors using AI and ML methods," Scientific Reports, vol. 12, no. 1, Aug. 2022, Art. no. 13267.

H. Samadi and M. A. Kollathodi, "A comprehensive comparison and analysis of machine learning algorithms including evaluation optimized for geographic location prediction based on Twitter tweets datasets," Cogent Engineering, vol. 10, no. 1, Dec. 2023, Art. no. 2232602.

J. He, W. Shen, P. Divakaruni, L. Wynter, and R. Lawrence, "Improving Traffic Prediction with Tweet Semantics," in Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, Aug. 2013, pp. 1387–1393.

Y. Labidi, "Sociological analysis of victims of fraud & deception - A study of a sample of victims in Algerian society," ARID International Journal of Social Sciences and Humanities, vol. 6, no. 11, pp. 173–187, Jan. 2024.

X. Li, "Analysis of Criminal Activities Exploiting Social Media: With Special Regards to Criminal Cases of Wechat Fraud in Chinese Jurisdiction," Journal of Legal Studies, vol. 26, no. 40, pp. 19–36, Dec. 2020.

M. Madhukar and S. Verma, "Hybrid Semantic Analysis of Tweets: A Case Study of Tweets on Girl-Child in India," Engineering, Technology & Applied Science Research, vol. 7, no. 5, pp. 2014–2016, Oct. 2017.

A. Howard, Devrishi, P. Culliton, and Y. Guo, "Natural Language Processing with Disaster Tweets." 2019, [Online]. Available:

B. Ahmed, G. Ali, A. Hussain, A. Baseer, and J. Ahmed, "Analysis of Text Feature Extractors using Deep Learning on Fake News," Engineering, Technology & Applied Science Research, vol. 11, no. 2, pp. 7001–7005, Apr. 2021.

A. Bathula, S. Muhuri, S. kr. Gupta, and S. Merugu, "Secure certificate sharing based on Blockchain framework for online education," Multimedia Tools and Applications, vol. 82, no. 11, pp. 16479–16500, May 2023.

A. Bathula, S. K. Gupta, S. Merugu, and S. S. Skandha, "Academic Projects on Certification Management Using Blockchain- A Review," in 2022 International Conference on Recent Trends in Microelectronics, Automation, Computing and Communications Systems (ICMACC), Hyderabad, India, Sep. 2022, pp. 1–6.

S. Merugu, K. Jain, A. Mittal, and B. Raman, "Sub-scene Target Detection and Recognition Using Deep Learning Convolution Neural Networks," in ICDSMLA 2019, 2020, pp. 1082–1101.

M. Suresh, A. S. Shaik, B. Premalatha, V. A. Narayana, and G. Ghinea, "Intelligent & Smart Navigation System for Visually Impaired Friends," in Advanced Computing, 2023, pp. 374–383.

S. Merugu, M. C. S. Reddy, E. Goyal, and L. Piplani, "Text Message Classification Using Supervised Machine Learning Algorithms," in ICCCE 2018, Singapore, 2019, pp. 141–150.

A. Alabdulwahab, M. A. Haq, and M. Alshehri, "Cyberbullying Detection using Machine Learning and Deep Learning," International Journal of Advanced Computer Science and Applications, vol. 14, no. 10, pp. 424–432, Oct. 2023.

S. Kumar et al., "Multilayer Neural Network Based Speech Emotion Recognition for Smart Assistance," Computers, Materials & Continua, vol. 74, no. 1, pp. 1523–1540, 2022.


How to Cite

M. Fattah and M. A. Haq, “Tweet Prediction for Social Media using Machine Learning”, Eng. Technol. Appl. Sci. Res., vol. 14, no. 3, pp. 14698–14703, Jun. 2024.


Abstract Views: 137
PDF Downloads: 60

Metrics Information

Most read articles by the same author(s)