Detection of Mental Health Tendencies Using Naïve Bayes Based on Social Media Activity
DOI:
https://doi.org/10.55123/jomlai.v4i2.5959Kata Kunci:
Mental Health , Social Media , Naïve Bayes , Text ClassificationAbstrak
The development of social media has had a significant impact on individual mental health. This study aims to detect mental health trends based on user activity on social media using the Naïve Bayes algorithm. The data used is sourced from the Kaggle platform and collected through web scraping techniques with keywords related to mental health and social media activity. The analysis process includes data preprocessing, classification using Naïve Bayes, and evaluation of model performance by dividing training and test data at a ratio of 60:40, 70:30, and 80:20. The results showed that the Naïve Bayes method was able to classify mental health tendencies with the highest accuracy of 75.17% at a ratio of 60:40. Precision and recall were higher for the “Troubled” category compared to the “Good” category, showing the effectiveness of the model in detecting indications of mental disorders. However, there is still a prediction imbalance that affects the overall accuracy. These findings suggest that the Naïve Bayes algorithm can be a tool in social media-based mental health early detection, which can be used by health practitioners and researchers to design more appropriate intervention strategies.
Referensi
A. Ilham and W. Pramusinto, ‘ANALISIS SENTIMEN MASYARAKAT TERHADAP KESEHATAN MENTAL PADA TWITTER MENGGUNAKAN ALGORITME K-NEAREST NEIGHBOR’, 2023.
A. Rosmalina and T. Khaerunnisa, ‘Penggunaan Media Sosial dalam Kesehatan Mental Remaja’, Prophetic: Professional, Empathy and Islamic Counseling Journal, vol. 4, no. 1, pp. 49–58, 2021, [Online]. Available: http://syekhnurjati.ac.id/jurnal/index.php/prophetic
M. Langgeng Wicaksono and D. Apriana, ‘ANALISIS SENTIMEN KESEHATAN MENTAL MENGGUNAKAN K-NEAREST NEIGHBORS PADA SOSIAL MEDIA TWITTER’, 2022.
M. Phangadi, ‘Peningkatan pengidap penyakit mental pada generasi Z periode 2013-2018’, 2019, Accessed: Mar. 18, 2025. [Online]. Available: https://osf.io/preprints/inarxiv/p6ms3/
S. Ardiansyah et al., KESEHATAN MENTAL. [Online]. Available: www.globaleksekutifteknologi.co.id
F. Arrahmi Thahir, F. Adisti Hajarini, K. Nasution, T. Nazira Harahap, and V. Wulandari, ‘KESEHATAN MENTAL DI ERA GENERASI Z DALAM STUDI KASUS SMP NEGERI 36 MEDAN’, JMA), vol. 1, no. 1, 2023.
American Psychological Association, ‘Stress in America, United States, 2007-2018’, 2025, Accessed: Mar. 28, 2025. [Online]. Available: https://www.icpsr.umich.edu/web/RCMD/studies/37288/versions/V2/publications
Z. N. Rudianto, ‘PENGETAHUAN GENERASI Z TENTANG LITERASI KESEHATAN DAN KESADARAN MENTAL DI MASA PANDEMI’, 2022.
A. J.-T. B. J. of Psychiatry and undefined 2000, ‘Mental health literacy: Public knowledge and beliefs about mental disorders’, cambridge.org, doi: 10.1192/bjp.177.5.396.
‘Rachmayani: Studi awal: Gambaran literasi kesehatan... - Google Scholar’. Accessed: Mar. 28, 2025. [Online]. Available: https://scholar.google.com/scholar?cluster=676048393426094152&hl=en&oi=scholarr
UNICEF - United Nations Children’s Fund, ‘The State of the World’s Children 2021: On My Mind--Promoting, Protecting and Caring for Children’s Mental Health.’, UNICEF, Oct. 2021.
A. Rizkiah, R. D. Risanty, and R. Mujiastuti, ‘SISTEM PENDETEKSI DINI KESEHATAN MENTAL EMOSIONAL ANAK USIA 4-17 TAHUN MENGGUNAKAN METODE FORWARD CHAINING’. [Online]. Available: https://jurnal.umj.ac.id/index.php/just-
Y. Femilia Nugraini, R. Rohmat Saedudin, and R. Andreswari, ‘IMPLEMENTASI DATA MINING DALAM KASUS MENTAL HEALTH PADA SOSIAL MEDIA TWITTER MENGGUNAKAN METODE NAIVE BAYES’.
H. Simorangkir and K. M. Lhaksmana, ‘Analisis Sentimen pada Twitter untuk Games Online Mobile Legends dan Arena of Valor dengan Metode Naïve Bayes Classifier’. [Online]. Available: https://dev.twitter.com.
L. Aji Andika and P. Amalia Nur Azizah, ‘Analisis Sentimen Masyarakat terhadap Hasil Quick Count Pemilihan Presiden Indonesia 2019 pada Media Sosial Twitter Menggunakan Metode Naive Bayes Classifier’, 2019.
E. Malfasari et al., ‘KONDISI MENTAL EMOSONAL PADA REMAJA’.
H. Li and J. Li, ‘Research and Application of University English Writing Teaching Reform Based on Data Mining’, Journal of Cases on Information Technology, vol. 26, no. 1, 2024, doi: 10.4018/JCIT.347667.
M. R. Firdaus, N. Rahaningsih, and R. D. Dana, ‘Analisis Sentimen Aplikasi Shopee di Goole Play Store Menggunakan Klasifikasi Algoritma Naïve Bayes’, 2024.
E. Pane, … R. H.-Zona. J. S., and undefined 2024, ‘SISTEM PENILAIAN UJIAN ESAI SECARA OTOMATIS DENGAN ALGORITMA TEXT MINING COSINE SIMILARITY PENUNJANG PEMBELAJARAN’, pustaka-psm.unilak.ac.idES Pane, R Hardianto, W ChoriahZONAsi: Jurnal Sistem Informasi, 2024•pustaka-psm.unilak.ac.id, Accessed: Mar. 28, 2025. [Online]. Available: https://pustaka-psm.unilak.ac.id/index.php/zn/article/view/20539
F. Fridom Mailo et al., ‘Analisis Sentimen Data Twitter Menggunakan Metode Text Mining Tentang Masalah Obesitas di Indonesia’, 2021.
D. Surya Sayogo, B. Irawan, and A. Bahtiar, ‘ANALISIS SENTIMEN ULASAN INSTAGRAM DI GOOGLE PLAY STORE MENGGUNAKAN ALGORITMA NAÏVE BAYES’, 2023.
J. Multidisiplin Saintek, Y. Candra Pratama, and Z. Reno Saputra, ‘SISTEM INFORMASI DESA DELTA UPANG BERBASIS WEB’, vol. 2, no. 12, pp. 86–96, 2024, [Online]. Available: https://ejournal.warunayama.org/kohesi
A. Yoga Pratama et al., ‘Analisis Sentimen Media Sosial Twitter Dengan Algoritma K-Nearest Neighbor Dan Seleksi Fitur Chi-Square (Kasus Omnibus Law Cipta Kerja)’, 2021.
H. Schütze, C. Manning, and P. Raghavan, ‘Introduction to information retrieval’, 2008, Accessed: Mar. 28, 2025. [Online]. Available: https://www.cis.uni-muenchen.de/~hs/teach/14s/ir/pdf/19web.pdf
I. R.-I. 2001 workshop on empirical methods in artificial and undefined 2001, ‘An empirical study of the naive Bayes classifier’, dors.itI RishIJCAI 2001 workshop on empirical methods in artificial intelligence, 2001•dors.it, Accessed: Mar. 28, 2025. [Online]. Available: https://www.dors.it/documentazione/testo/201911/10.1.1.330.2788.pdf
H. Z.- Aa and undefined 2004, ‘The optimality of naive Bayes’, cdn.aaai.org, Accessed: Mar. 28, 2025. [Online]. Available: https://cdn.aaai.org/FLAIRS/2004/Flairs04-097.pdf
A. McCallum, K. N.-A.-98 workshop on learning for, and undefined 1998, ‘A comparison of event models for naive bayes text classification’, yangli-feasibility.comA McCallum, K NigamAAAI-98 workshop on learning for text categorization, 1998•yangli-feasibility.com, Accessed: Mar. 28, 2025. [Online]. Available: http://yangli-feasibility.com/home/classes/lfd2022fall/media/aaaiws98.pdf
F. Dwi Astuti et al., ‘Sentimen Analisis Review Pengguna Marketplace Online Menggunakan Naïve Bayes Classifier’, core.ac.ukS Rahayu, K Kusrini, H SismoroInformasi Interaktif, 2018•core.ac.uk, 2018, Accessed: Mar. 28, 2025. [Online]. Available: https://core.ac.uk/download/pdf/231289869.pdf
Unduhan
Diterbitkan
Cara Mengutip
Terbitan
Bagian
Lisensi
Hak Cipta (c) 2025 Jeremi Sibarani, Ratih Manalu, Dongan Parulian Hutasoit, Wilman Arif Telaumbanua, Victor Asido Elyakim P

Artikel ini berlisensiCreative Commons Attribution-ShareAlike 4.0 International License.
Copyright (c) 2022 The authors. Published by Yayasan Literasi Indonesia
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
The author(s) whose article is published in the JOMLAI journal attain the copyright for their article and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. By submitting the manuscript to JOMLAI, the author(s) agree with this policy. No special document approval is required.
The author(s) guarantee that:their article is original, written by the mentioned author(s),
- has never been published before,
- does not contain statements that violate the law, and
- does not violate the rights of others, is subject to copyright held exclusively by the author(s), and is free from the rights of third parties, and that the necessary written permission to quote from other sources has been obtained by the author(s).
The author(s) retain all rights to the published work, such as (but not limited to) the following rights:
- Copyright and other proprietary rights related to the article, such as patents,
- The right to use the substance of the article in its own future works, including lectures and books,
- The right to reproduce the article for its own purposes,
- The right to archive all versions of the article in any repository, and
- The right to enter into separate additional contractual arrangements for the non-exclusive distribution of published versions of the article (for example, posting them to institutional repositories or publishing them in a book), acknowledging its initial publication in this journal (JOMLAI: Journal of Machine Learning and Artificial Intelligence).
Suppose the article was prepared jointly by more than one author. Each author submitting the manuscript warrants that all co-authors have given their permission to agree to copyright and license notices (agreements) on their behalf and notify co-authors of the terms of this policy. JOMLAI will not be held responsible for anything that may arise because of the writer's internal dispute. JOMLAI will only communicate with correspondence authors.
Authors should also understand that their articles (and any additional files, including data sets, and analysis/computation data) will become publicly available once published. The license of published articles (and additional data) will be governed by a Creative Commons Attribution-ShareAlike 4.0 International License. JOMLAI allows users to copy, distribute, display and perform work under license. Users need to attribute the author(s) and JOMLAI to distribute works in journals and other publication media. Unless otherwise stated, the author(s) is a public entity as soon as the article is published



















