Stacking Ensemble Learning Technique for Sentiment Analysis of Hate Speech on Twitter
Main Article Content
Abstract
Hate speech on social media, especially on the Twitter platform, is an increasing problem. The spread of negative, demeaning, or threatening messages can have a negative impact on individuals and society at large. Previous research focuses more on improving accuracy in general without looking at the f1-score on tweets categorized as negative. Therefore, this research aims to address these issues by improving the accuracy and f1-score of the overall sentiment analysis of hate speech on Twitter. Through the use Stacking Ensemble Learning technique, It was found that the combination of models consisting of Support Vector Machine (SVM), Decision Tree, and Random Forest was able to provide the most accurate results with an accuracy rate of 96.16% and F1 Score of 96.13%. This research demonstrates the potential of using these techniques to effectively and efficiently identify and address hate speech on Twitter, and contributes to creating a more positive and safe online environment.
Article Details

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
K. Olteanu, A., Castillo, C., Boy, J., & Varshneya, “Social media and hate speech: A machine learning perspective,” Proc. 12th ACM Conf. Web Sci., pp. 279–287, 2019, https://doi.org/10.1145/3292522.3326017.
F. E. Ayo, O. Folorunso, F. T. Ibharalu, and I. A. Osinuga, “Machine learning techniques for hate speech classification of twitter data: State-of-The-Art, future challenges and research directions,” Comput. Sci. Rev., vol. 38, p. 100311, 2020, https://doi.org/10.1016/j.cosrev.2020.100311.
H. Madhu, S. Satapara, S. Modha, T. Mandl, and P. Majumder, “Detecting offensive speech in conversational code-mixed dialogue on social media: A contextual dataset and benchmark experiments,” Expert Syst. Appl., vol. 215, no. May 2022, p. 119342, 2023, https://doi.org/10.1016/j.eswa.2022.119342.
I. R. Ammar Aouchiche, F. Boumahdi, A. Madani, and M. A. Remmide, “Hate Speech Prediction on Social Media,” SN Comput. Sci., vol. 4, no. 3, pp. 1–7, 2023, https://doi.org/10.1007/s42979-023-01668-6.
C. Min et al., “Finding hate speech with auxiliary emotion detection from self-training multi-label learning perspective,” Inf. Fusion, vol. 96, no. January, pp. 214–223, 2023, https://doi.org/10.1016/j.inffus.2023.03.015.
N. Tri Romadloni, I. Santoso, and S. Budilaksono, “Perbandingan Metode Naive Bayes, Knn Dan Decision Tree Terhadap Analisis Sentimen Transportasi Krl Commuter Line,” J. IKRA-ITH Inform., vol. 3, no. 2, pp. 1–9, 2019.
W. Hidayatullah, M. R., & Maharani, “Depression Detection on Twitter Social Media Using Decision Tree,” J. RESTI, vol. 6(4), pp. 677–683, 2022, [Online]. Available: http://jurnal.iaii.or.id
D. A. Pisner, “Support Vector Machine,” Mach. Learn., pp. 101–121, 2020, https://doi.org/10.1016/B978-0-12-815739-8.00006-7.
M. Siino, E. Di Nuovo, I. Tinnirello, and M. la Cascia, “Detection of Hate Speech Spreaders using convolutional neural networks,” CEUR Workshop Proc., vol. 2936, pp. 2126–2136, 2021.
E. Finogeev, M. Kaprielova, A. Chashchin, K. Grashchenkov, G. Gorbachev, and O. Bakhteev, “Hate speech spreader detection using contextualized word embeddings,” CEUR Workshop Proc., vol. 2936, pp. 1937–1944, 2021.
Muslim, M. A., Nikmah, T. L., Pertiwi, D. A. A., Subhan, Jumanto, Dasril, Y., and Iswanto., “New model combination meta-learner to improve accuracy prediction P2P lending with stacking ensemble learning: Intelligent Systems with Applications,” vol. 18, p. 200204, 2023, https://doi.org/10.1016/j.iswa.2023.200204
Sidik, D. D., & Sen, T. W. “Penggunaan Stacking Classifier Untuk Prediksi Curah Hujan,” IT FOR SOCIETY, vol. 04(01), 2021.
Putri, A. K., & Suparwito, H. “Uji Algoritma Stacking Ensemble Classifier pada Kemampuan Adaptasi Mahasiswa Baru dalam Pembelajaran Online,” KONSTELASI: Konvergensi Teknologi dan Sistem Informasi, vol. 3(1), 1, 2023.
Chen, E. L. E., Chen, C. Y. L., and Lee, C. Y. L. “Meta-rPPG: Remote Heart Rate Estimation Using a Transductive Meta-Learner,” arXiv preprint https://arxiv.org/abs/2007.06786, 2020.
AL-Alimi, D., Al-qaness, M. A. A., Cai, Z., Dahou, A., Shao, Y., & Issaka, S. “Meta-Learner Hybrid Models to Classify Hyperspectral Images. Remote Sensing,” vol. 14(4), 1038, 2022, https://doi.org/10.3390/rs14041038.
M. Ragab, A. M. Abdel Aal, A. O. Jifri, and N. F. Omran, "Enhancement of predicting students performance model using ensemble approaches and educational data mining techniques," Wireless Communications and Mobile Computing, vol. 2021, pp. 1-9, 2021.
A. Ollagnier, E. Cabrio, and S. Villata, “Unsupervised fine-grained hate speech target community detection and characterisation on social media,” Soc. Netw. Anal. Min., vol. 13, no. 1, 2023, https://doi.org/10.1007/s13278-023-01061-4.
P. Kathiravan, R. Saranya, and S. Sekar, “Sentiment Analysis of COVID-19 Tweets Using TextBlob and Machine Learning Classifiers BT - Proceedings of International Conference on Data Science and Applications,” 2023, pp. 89–106.
Ruuska, S., Hamäläinen, W., Kajava, S., Mughal, M., Matilainen, P., & Mononen, J., “Evaluation of the confusion matrix method in the validation of an automated system for measuring feeding behaviour of cattle,” Behavioural Processes. 2018, https://doi.org/10.1016/j.beproc.2018.01.004.