EKSPLORASI SENTIMEN PENGGUNA X TERHADAP ISU KESEHATAN MENTAL BERBASIS MACHINE LEARNING
DOI:

Abstract
Mental health has become an increasingly relevant topic in the digital era, particularly on social media platforms such as X, which serve as public spaces for expressing opinions and sharing personal experiences. This study aims to analyze public sentiment toward mental health topics on Twitter using the Multinomial Naive Bayes algorithm. Data were collected from tweets containing mental health-related keywords and processed through text cleaning and feature extraction using the TF-IDF method. The classification results showed that the model achieved an accuracy of 71%, with stronger performance in identifying negative sentiment compared to positive sentiment. A WordCloud visualization also revealed the frequent appearance of terms such as “mental,” “health,” “self,” and “disorder,” reflecting the main focus of online discussions. These findings indicate that machine learning-based sentiment analysis is effective in capturing public perceptions of mental health issues on social media. This research is expected to contribute to the development of digital communication strategies and real-time monitoring of psychosocial issues in online spaces.
Downloads
References
Adhi, M. S., Nafan, M. Z., & Usada, E. (2019). Pengaruh Semantic Expansion pada Naïve Bayes Classifier untuk Analisis Sentimen Tokoh Masyarakat. Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), 3(2), 141–147. https://doi.org/10.29207/resti.v3i2.901
Agustin, A. V., Sa’adah, F. N., & Umaidah, Y. (2024). Analisis Sentimen Menggunakan Metode Naive Bayes Terhadap Childfree. Dinamik, 29(1), 31–40. https://doi.org/10.35315/dinamik.v29i1.9455
Alzami, F., Udayanti, E. D., Prabowo, D. P., & Megantara, R. A. (2020). Document Preprocessing with TF-IDF to Improve the Polarity Classification Performance of Unstructured Sentiment Analysis. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 4(3), 235–242. https://doi.org/10.22219/kinetik.v5i3.1066
Borg, A., & Boldt, M. (2020). Using VADER sentiment and SVM for predicting customer response sentiment. Expert Systems with Applications, 162, 113746. https://doi.org/10.1016/j.eswa.2020.113746
Chiny, M., Chihab, M., Lahcen, A. A., Bencharef, O., & Chihab, Y. (2023). Effect of word embedding vector dimensionality on sentiment analysis through short and long texts. IAES International Journal of Artificial Intelligence, 12(2), 823–830. https://doi.org/10.11591/ijai.v12.i2.pp823-830
Farhana, S. (2021). Classification of Academic Performance for University Research Evaluation by Implementing Modified Naive Bayes Algorithm. Procedia Computer Science, 194, 224–228. https://doi.org/10.1016/j.procs.2021.10.077
Fatihah Rahmadayana, & Yuliant Sibaroni. (2021). Sentiment Analysis of Work from Home Activity using SVM with Randomized Search Optimization. Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), 5, 936–942. https://doi.org/10.29207/resti.v5i5.3457
Gabriela, N. H., Siautama, R., Amadea, C. I. A., & Suhartono, D. (2021). Extractive Hotel Review Summarization based on TF/IDF and Adjective-Noun Pairing by Considering Annual Sentiment Trends. Procedia Computer Science, 179(2020), 558–565. https://doi.org/10.1016/j.procs.2021.01.040
Govindasamy, K. A. L., & Palanichamy, N. (2021). Depression detection using machine learning techniques on twitter data. Proceedings - 5th International Conference on Intelligent Computing and Control Systems, ICICCS 2021, Iciccs, 960–966. https://doi.org/10.1109/ICICCS51141.2021.9432203
Hananto, A. D., Erfiana, A. M., Putri, B. L. P., Putri, P. D., & Kurniawan, F. (2023). Algoritma Machine Learning Naïve Bayes pada Analisis Sentimen Kesepakatan Polri dan GNPF-MUI pada Aksi Bela Islam III “212.” SINTA Journal (Science, Technology, and Agricultural), 4(2), 151–160. https://doi.org/10.37638/sinta.4.2.151-160
Juliansen, A., Heriyanto, R. S., Muljono, M. P., Budiputri, C. L., Sagala, Y. D. S., & Octavius, G. S. (2024). Mental health issues and quality of life amongst school-based adolescents in Indonesia. Journal of Medicine, Surgery, and Public Health, 2(October 2023), 100062. https://doi.org/10.1016/j.glmedi.2024.100062
Kholifah, B., Syarif, I., & Badriyah, T. (2020). Mental Disorder Detection via Social Media Mining using Deep Learning. Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 4, 309–316. https://doi.org/10.22219/kinetik.v5i4.1120
Liang, Y., Liu, L., Ji, Y., Huangfu, L., & Zeng, D. D. (2023). Identifying emotional causes of mental disorders from social media for effective intervention. Information Processing and Management, 60(4). https://doi.org/10.1016/j.ipm.2023.103407
Nabiilah, G. Z., Prasetyo, S. Y., Izdihar, Z. N., & Girsang, A. S. (2023). ScienceDirect ScienceDirect 7th International Conference on Computer Science and Computational Intelligence 2022 BERT base model for toxic comment analysis on BERT base model for toxic comment analysis on Indonesian social media Indonesian social media. Procedia Computer Science, 216(2022), 714–721. https://doi.org/10.1016/j.procs.2022.12.188
Nayoga, B. P., Adipradana, R., Suryadi, R., & Suhartono, D. (2021). Hoax Analyzer for Indonesian News Using Deep Learning Models. Procedia Computer Science, 179(2020), 704–712. https://doi.org/10.1016/j.procs.2021.01.059
Neogi, A. S., Garg, K. A., Mishra, R. K., & Dwivedi, Y. K. (2021). Sentiment analysis and classification of Indian farmers’ protest using twitter data. International Journal of Information Management Data Insights, 1(2), 100019. https://doi.org/10.1016/j.jjimei.2021.100019
Rifaldi, D., Fadlil, A., & Herman. (2023). Teknik Preprocessing Pada Text Mining Menggunakan Data Tweet Mental Health. Jurnal Pendidikan Teknologi Informasi, 3(2), 161–171.
Rifaldi, D., Fadlil, A., & Herman. (2024). Implementation of Word Trends Using a Machine Learning Approach with TF-IDF and Latent Dirichlet Allocation. International Journal on Informatics Visualization, 8(4), 2297–2304. https://doi.org/10.62527/joiv.8.4.2452
Uthirapathy, S. E., & Sandanam, D. (2022). Topic Modelling and Opinion Analysis on Climate Change Twitter Data Using LDA and BERT Model. Procedia Computer Science, 218(2022), 908–917. https://doi.org/10.1016/j.procs.2023.01.071
Wilson, C., & McDarby, V. (2023). Social Media and Mental Health. Clinical child psychology and psychiatry, 28(1), 157–160. https://doi.org/10.1177/13591045221144926
Xu, Z., Ye, Z., Ye, H., Zhu, L., Lu, K., Quan, H., Wang, J., Gu, S., Zhang, S., & Zhang, G. (2024). Public Opinion Evolution Law and Sentiment Analysis of Campus Online Public Opinion Events. Journal of Advanced Computational Intelligence and Intelligent Informatics, 28(4), 990–1004. https://doi.org/10.20965/jaciii.2024.p0990
Downloads
Published
Versions
- 2025-10-15 (2)
- 2025-08-21 (1)
How to Cite
Issue
Section
License
Copyright (c) 2025 Dianda Rifaldi, Tri Stiyo Famuji, Galih Pramuja Inngam Fanani, Fauzan Purma Ramadhan, Iriene Putri Mulyadi, Vanji Saputra

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright Notice
An author who publishes in the Journal of Software Engineering and Information System (SEIS) agrees to the following terms:
- Author retains the copyright and grants the journal the right of first publication of the work simultaneously licensed under the Creative Commons Attribution-ShareAlike 4.0 License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal
- Author is able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book) with the acknowledgement of its initial publication in this journal.
- Author is permitted and encouraged to post his/her work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of the published work (See The Effect of Open Access).
Read more about the Creative Commons Attribution-ShareAlike 4.0 Licence here: https://creativecommons.org/licenses/by-sa/4.0/.