Sentiment Analysis of Public Opinion on the Gaza Conflict Using Machine Learning

Authors

  • Agil Irman Fadri Universitas Islam Negeri Sultan Syarif Kasim Riau, Indonesia
  • Nur Futri Ayu Jelita Universitas Islam Negeri Sultan Syarif Kasim Riau, Indonesia
  • Diamond Dimas Bagaskara Universitas Islam Negeri Sultan Syarif Kasim Riau, Indonesia
  • Raudiatul Zahra Erciyes Üniversitesi, Turkiye

DOI:

https://doi.org/10.57152/predatecs.v3i2.2088

Keywords:

Gaza Conflict, Logistic Regression, Multi Layer Perceptron, Sentiment Analysis, XGBoost

Abstract

The 2023 escalation of the Gaza conflict triggered widespread public discourse on the X platform, highlighting the importance of sentiment analysis for understanding public opinion on global geopolitical issues. While sentiment analysis has been widely applied to social media data, comparative evaluations of machine learning models on conflict-related datasets remain limited. This study analyzes public sentiment toward the Gaza conflict by comparing the performance of Multi-Layer Perceptron, XGBoost, and Logistic Regression models. A dataset of 2,175 tweets was processed using standard text preprocessing techniques and TF-IDF feature extraction. Model performance was evaluated using multiple train-test split scenarios. The results indicate that Logistic Regression consistently outperformed the other models, achieving the highest accuracy of 73.17% with an 80:20 data split. These findings suggest that simpler linear models may perform more robustly and efficiently than more complex approaches when applied to high-dimensional, noisy social media text data. This study provides practical insights into model selection for sentiment analysis of conflict-related discussions on social media platforms.

References

P. Kayade, A. Pardeshi, S. Patil, P. Shetkar, P. Raut, and V. Singh, “Sentiment Analysis On Israel-Palestine Reddit Dataset,” J. Emerg. Technol. Innov. Res., vol. 11, no. 11, pp. 1–8, 2024.

A. Gangwar and T. Mehta, “Sentiment Analysis of Political Tweets for Israel Using Machine Learning,” in ICMLBDA-2022, 2023, p. 10.

A. Liyih, S. Anagaw, M. Yibeyin, and Y. Tehone, “Sentiment analysis of the Hamas-Israel war on YouTube comments using deep learning,” Sci. Rep., vol. 14, 2024.

D. Sarah Delva and K. Muslim Lhaksmana, “Sentiment Analysis of the Palestine-Israel Crisis on Social Media using Convolutional Neural Network,” Technol. Sci., vol. 6, no. 1, pp. 334–343, 2024.

J. Rosenberger, F. U. Erlangen-nürnberg, and L. Gasse, “Hate Speech and Sentiment of YouTube Video Comments From Public and Private Sources Covering the Israel-Palestine Conflict,” in Wirtschaftsinformatik 2024 Proceedings, 2024.

K. El Damanhoury, F. Saleh, and M. Lebovic, “Covering the Israeli–Palestinian Conflict: A Critical Discourse Analysis of Al Jazeera English and BBC’s Online Reporting on the 2023 Gaza War,” J. Media Stud., vol. 6, no. 1, pp. 1–16, 2025.

F. Fahrani; J. Aryanto, “Sentiment Analysis of Public Opinion on the Palestinian-Israeli Conflict using Support Vector Machine and Naïve Bayes Algorithms,” JSRET (Journal Sci. Res. Educ. Technol., vol. 3, no. 4, pp. 1890–1900, 2024.

F. Z. El-Hassani, M. Amri, N. E. Joudar, and K. Haddouch, “A New Optimization Model for MLP Hyperparameter Tuning: Modeling and Resolution by Real-Coded Genetic Algorithm,” Neural Process. Lett., vol. 56, no. 2, 2024.

M. Askari and F. Keynia, “Mid-term electricity load forecasting by a new composite method based on optimal learning MLP algorithm,” IET Gener. Transm. Distrib., vol. 14, no. 5, pp. 845–852, 2020.

K. Afifah, I. N. Yulita, and I. Sarathan, “Sentiment Analysis on Telemedicine App Reviews using XGBoost Classifier,” 2021 Int. Conf. Artif. Intell. Big Data Anal. ICAIBDA 2021, pp. 22–27, 2021.

E. Dataset and H. A. Taher, “Dual-Language Sentiment Analysis?: A Comprehensive Evaluating SVM , Dual-Language Sentiment Analysis?: A Comprehensive Evaluating SVM , Logistic Regression , XGBoost , and Decision Tree Using TF-IDF On Arabic and English Dataset,” Wasit J. Pure Sci., vol. 3, no. 4, pp. 59–69, 2023.

I. G. B. A. Budaya and I. K. P. Suniantara, “Comparison of Sentiment Analysis Algorithms with SMOTE Oversampling and TF-IDF Implementation on Google Reviews for Public Health Centers,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 3, pp. 1077–1086, 2024.

A. Madasu and S. Elango, “Efficient feature selection techniques for sentiment analysis,” Multimed. Tools Appl., vol. 79, no. 9–10, pp. 6313–6335, 2020.

F. H. Rachman, “Twitter Sentiment Analysis of Covid-19 Using Term Weighting TF-IDF And Logistic Regresion,” Int. Conf. Inf. Technol. Inf. Syst., pp. 238–242, 2020.

T. Hema et al., “Sentiment analysis of twitter data related to Rinca Island development using Doc2Vec and SVM and logistic regression as classifier,” Procedia Comput. Sci., vol. 197, pp. 660–667, 2022.

G. Airlangga, “Predicting Student Performance Using Deep Learning Models?: A Comparative Study of MLP , CNN , BiLSTM , and LSTM with Attention,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 4, pp. 1561–1567, 2024.

A. Al Bataineh and S. Manacek, “MLP-PSO Hybrid Algorithm for Heart Disease Prediction,” J. Pers. Med., vol. 12, no. 8, 2022.

G. Airlangga, “Spam Detection in YouTube Comments Using Deep Learning Models?: A Comparative Study of MLP , CNN , LSTM , BiLSTM , GRU , and Attention Mechanisms,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 4, pp. 1533–1538, 2024.

L. Duan, “Machine Learning Modeling for Forecasting Repeat Purchases in Online Shopping,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 3, pp. 863–874, 2024.

N. Anggraini, S. J. Putra, L. K. Wardhani, F. D. U. Arif, N. Hakiem, and I. M. Shofi, “A Comparative Analysis of Random Forest, XGBoost, and LightGBM Algorithms for Emotion Classification in Reddit Comments,” J. Tek. Inform., vol. 17, no. 1, pp. 88–97, 2024.

G. Airlangga, “Exoplanet Classification Through Machine Learning: A Comparative Analysis of Algorithms Using Kepler Data,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 3, pp. 753–763, 2024.

A. Samih, A. Ghadi, and A. Fennan, “Enhanced sentiment analysis based on improved word embeddings and XGboost,” Int. J. Electr. Comput. Eng., vol. 13, no. 2, pp. 1827–1836, 2023.

F. A. K. Murti, “Predictive Model Comparison for Predicting Condom Use: Comparison of Conventional Logistic Regression and Other Machine Learning,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 4, pp. 1320–1329, 2024.

K. Shah, H. Patel, D. Sanghvi, and M. Shah, “A Comparative Analysis of Logistic Regression, Random Forest and KNN Models for the Text Classification,” Augment. Hum. Res., vol. 5, no. 1, 2020.

Z. C. Dwinnie et al., “Application of the Supervised Learning Algorithm for Classification of Pregnancy Risk Levels,” vol. 1, pp. 26–33, 2023.

Z. C. Dwynne; Mustakim; Mustafa, “Comparison Of Machine Learning Algorithms On Sentiment Analysis Of Elsagate Content,” in 2024 International Conference on Smart Computing, IoT and Machine Learning (SIML), 2024, pp. 239–243.

M. A. Ullah, S. M. Marium, S. A. Begum, and N. S. Dipa, “An algorithm and method for sentiment analysis using the text and emoticon,” ICT Express, vol. 6, no. 4, pp. 357–360, 2020.

Downloads

Published

2026-02-01

How to Cite

Fadri, A. I., Jelita, N. F. A., Bagaskara, D. D., & Zahra, R. (2026). Sentiment Analysis of Public Opinion on the Gaza Conflict Using Machine Learning. Public Research Journal of Engineering, Data Technology and Computer Science, 3(2), 138-148. https://doi.org/10.57152/predatecs.v3i2.2088