SENTIMENT ANALYSIS OF MENTAL HEALTH REVIEWS USING MACHINE LEARNING ALGORITHMS
DOI:
https://doi.org/10.34288/jri.v8i1.422Keywords:
Sentiment Analysis, Mental Health, Machine LearningAbstract
Mental health is a significant issue in the modern era due to lifestyle changes, social pressures, and technological advancements that introduce new challenges. These problems affect various aspects of life, including education, employment, social relationships, and overall quality of life. Technological development enables the use of machine learning to automatically classify large amounts of data. This study aims to analyze and compare the performance of Support Vector Machines (SVM), K-Nearest Neighbor (K-NN), Naïve Bayes (NB), Logistic Regression (LR), Decision Tree (DT), and Random Forest (RF) in sentiment classification on mental health issues, while simultaneously contributing to scientific development and supporting the understanding of public psychological conditions. The dataset used in this research was obtained from Kaggle and consists of 20,364 mental health–related reviews in .CSV format, processed using Google Colab with the Python programming language. The data were categorized into two groups—depression and suicidewatch—and then underwent preprocessing, data splitting into training and testing sets with an 80:20 ratio, and TF-IDF weighting. The results indicate that the SVM algorithm outperforms the other methods. Using an RBF kernel and a C parameter of 15, SVM achieved an accuracy of 72.09%, a precision of 72.11%, a recall of 72.09%, and an F1-score of 72.09%. This study not only provides scientific contributions but also supports efforts to better understand the psychological conditions experienced by society.
Downloads
References
Anggraini, J., & Alita, D. (2024). Implementasi Metode SVM Pada Sentimen Analisis Terhadap Pemilihan Presiden (Pilpres) 2024 Di Twitter. Jurnal Informatika: Jurnal Pengembangan IT, 9(2), 102–111. https://doi.org/10.30591/jpit.v9i2.6560
Ariyo Munandar, A., Farikhin, & Edi Widodo, C. (2023). Sentimen Analisis Aplikasi Belajar Online Menggunakan Klasifikasi SVM. 7(1), 77–84.
Cahyaningtyas, C., Nataliani, Y., & Widiasari, I. R. (2021). Analisis sentimen pada rating aplikasi Shopee menggunakan metode Decision Tree berbasis SMOTE. AITI: Jurnal Teknologi Informasi, 18(Agustus), 173–184.
Chancellor, S., & De Choudhury, M. (2020). Methods in predictive techniques for mental health status on social media: a critical review. In npj Digital Medicine (Vol. 3, Issue 1). Nature Research. https://doi.org/10.1038/s41746-020-0233-7
Daffa, M., Fahreza, A., Luthfiarta, A., Rafid, M., Indrawan, M., & Nugraha, A. (2024). Analisis Sentimen: Pengaruh Jam Kerja Terhadap Kesehatan Mental Generasi Z. Journal Of Applied Computer Science And Technology (JACOST), 5(1), 2723–1453. https://doi.org/10.52158/jacost.715
Ernawati, S., Frieyadie, & Yulia, E. R. (2025). HyVADSVM: Hybrid VADER-SVM and GridSearchCV Optimization for Enhancing Cyberbullying Detection. Journal of Robotics and Control (JRC), 6(1), 101–113. https://doi.org/10.18196/jrc.v6i1.24385
Ernawati, S., & Wati, R. (2024). Evaluasi Performa Kernel SVM dalam Analisis Sentimen Review Aplikasi ChatGPT Menggunakan Hyperparameter dan VADER Lexicon. In Jurnal Buana Informatika (Vol. 15, Issue 1).
Huda, D. N. I., Prianto, C., & Awangga, R. M. (2023). Analisis Sentimen Perbandingan Layanan Jasa Pengiriman Kurir Pada Ulasan Play Store Menggunakan Metode Random Forest dan Descision Tree. Jurnal Ilmiah Informatika(JIF), 11.
Huntington Psychological Service. (2024, August 4). The Latest Mental Health Statistics: What the Numbers Say About the State of Our Minds in 2024. Huntington Psychological Service.
Ilham, A., & Pramusinto, W. (2023). Analisis Sentimen Masyarakat Terhadap Kesehatan Mental Pada Twitter Menggunakan Algoritme K-Nearest Neighbor. SENAFTI, 2(2).
Isnain, A. R., Supriyanto, J., & Kharisma, M. P. (2021). Implementation of K-Nearest Neighbor (K-NN) Algorithm For Public Sentiment Analysis of Online Learning. IJCCS (Indonesian Journal of Computing and Cybernetics Systems), 15(2), 121. https://doi.org/10.22146/ijccs.65176
Kanugrahan, G., Hafizh, V., Putra, C., & Ramdhani, Y. (2024). Analisis Sentimen Aplikasi Gojek Menggunakan SVM, Random Forest dan Decision Tree. Jurnal Infortech, 6(2), 171–178. http://ejournal.bsi.ac.id/ejurnal/index.php/infortech
Kartika Sari, A., Akhmad Irsyad, Dinda Nur Aini, Islamiyah, & Stephanie Elfriede Ginting. (2024). Analisis Sentimen Twitter Menggunakan Machine Learning untuk Identifikasi Konten Negatif. Adopsi Teknologi Dan Sistem Informasi (ATASI), 3(1), 64–73. https://doi.org/10.30872/atasi.v3i1.1373
Kevin, K., Enjeli, M., & Wijaya, A. (2024). Analisis Sentimen Pengunaaan Aplikasi Kinemaster Menggunakan Metode Naive Bayes. Jurnal Ilmiah Computer Science, 2(2), 89–98. https://doi.org/10.58602/jics.v2i2.24
Latifah, U., Zuhriya, T. K., & Daniati, E. (2025). Analisis Sentimen Komentar Twitter (X) tentang Kesehatan Mental menggunakan Naïve Bayes untuk Mengukur Opini Publik. Seminar Nasional Inovasi Teknologi, 9, 2549–7952.
Liu, Q., Chen, C., Zhang, Y., & Hu, Z. (2011). Feature selection for support vector machines with RBF kernel. Artificial Intelligence Review, 36(2), 99–115. https://doi.org/10.1007/s10462-011-9205-2
Majid, A. M., Imelda, K., & Nawangsih, I. (2025). Komparasi Algoritma Klasifikasi Machine Learning dan Penerapan Metode Ensemble Stacking untuk Menganalisis Sentimen Kesehatan Mental. SKANIKA: Sistem Komputer Dan Teknik Informatika, 8(2), 293–304. https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health
Mamani-Coaquira, Y., & Villanueva, E. (2024). A Review on Text Sentiment Analysis With Machine Learning and Deep Learning Techniques. In IEEE Access (Vol. 12, pp. 193115–193130). Institute of Electrical and Electronics Engineers Inc. https://doi.org/10.1109/ACCESS.2024.3513321
Nasir, A. A. B. M., & Palanichamy, N. (2022). Sentiment Analysis of Covid-19 Tweets by Supervised Machine Learning Models. Journal of System and Management Sciences, 12(6), 50–69. https://doi.org/10.33168/JSMS.2022.0604
Pramesti, L. A., & Pratiwi, N. (2023). Analisis Sentimen Twitter Terhadap Program MBKM Menggunakan Decision Tree dan Support Vector Machine. Journal of Information System Research (JOSH), 4(4), 1145–1154. https://doi.org/10.47065/josh.v4i4.3807
Ramadhani, B., & Suryono, R. R. (2024). Komparasi Algoritma Naïve Bayes dan Logistic Regression Untuk Analisis Sentimen Metaverse. JURNAL MEDIA INFORMATIKA BUDIDARMA, 8(2), 714. https://doi.org/10.30865/mib.v8i2.7458
Ramayanti, I., Hermawan, L., Syakurah, R. A., Stiawan, D., Meilinda, Negara, E. S., Fahmi, M., Ghiffari, A., & Rizqie, M. Q. (2025). Sentiment and Emotion Classification Models Using Hybrid Textual and Numerical Features: A Case Study of Mental Health Counseling. Journal of Applied Data Sciences, 6(3), 1482–1494. https://doi.org/10.47738/jads.v6i3.632
Saputra, A., & Noor Hasan, F. (2023). ANALISIS SENTIMEN TERHADAP APLIKASI COFFEE MEETS BAGEL DENGAN ALGORITMA NAÏVE BAYES CLASSIFIER. SIBATIK JOURNAL: Jurnal Ilmiah Bidang Sosial, Ekonomi, Budaya, Teknologi, Dan Pendidikan, 2(2), 465–474. https://doi.org/10.54443/sibatik.v2i2.579
Syahril Dwi Prasetyo, Shofa Shofiah Hilabi, & Fitri Nurapriani. (2023). Analisis Sentimen Relokasi Ibukota Nusantara Menggunakan Algoritma Naïve Bayes dan KNN. Jurnal KomtekInfo, 1–7. https://doi.org/10.35134/komtekinfo.v10i1.330
Wang, J., Wei, J., Tian, F., & Wei, Y. (2024). A comparative study of machine learning models for sentiment analysis of transboundary rivers news media articles. Soft Computing, 28(23), 13331–13347. https://doi.org/10.1007/s00500-024-10357-2
Wiratama Putra, T., & Triayudi, A. (2022). Analisis Sentimen Pembelajaran Daring menggunakan Metode Naïve Bayes, KNN, dan Decision Tree. Jurnal Teknologi Informasi Dan Komunikasi), 6(1), 2022. https://doi.org/10.35870/jti
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Risa Wati, Siti Ernawati*

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
The Jurnal Riset Informatika has legal rules for accessing digital electronic articles uunder a Creative Commons Attribution-NonCommercial 4.0 International License . Articles published in Jurnal Riset Informatika, provide Open Access, for the purpose of scientific development, research, and libraries.










