Analyzing Public Sentiment towards Mental Health on Social Media Twitter Using Machine Learning
Main Article Content
Abstract
Mental health affects lives globally, with around 300 million people experiencing depression in 2019, including 15.6 million in Indonesia. The Covid-19 pandemic increased cases of anxiety and depression, and by 2022, WHO reported 23 million people suffering from psychiatric disorders. In Indonesia, adolescent mental health issues are also high, with excessive social media use linked to an increase in emotional disorders. Twitter, with its real-time data, is becoming an important tool for analyzing public sentiment and understanding opinions through analytics and machine learning techniques. This study aims to determine public sentiment towards mental health in Indonesia through Twitter social media and test the effectiveness of using machine learning in sentiment analysis. The results show that the Naive Bayes and Decision Tree methods are effective in analyzing sentiment, with an accuracy of 91% and 89% respectively. The average result of cross validation shows a value of 73.21% for Naive Bayes and 67.02% for Decision Tree. In this study, positive sentiment is more dominant with a percentage value of 78.7%, while negative sentiment is only 21.3%. The findings indicate that Indonesians' awareness of the importance of mental health is increasing, and they increasingly understand the importance of maintaining mental health
Downloads
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with Positif : Jurnal Sistem dan Teknologi Informasi agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are 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 an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their 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 published work.
This work is licensed under a Creative Commons Attribution 4.0 International License.
References
[1] Kemenkes, “Pengertian Kesehatan Mental,” kemkes.go.id, 2018. https://ayosehat.kemkes.go.id/pengertian-kesehatan-mental (diakses 30 Agustus 2023).
[2] Itsbil, “Depresi, Kesehatan Mental yang Tak Boleh Disepelekan,” Kampus ITS, 2023. https://www.its.ac.id/news/2023/05/22/__trashed-5/ (diakses 24 Agustus 2023).
[3] Z. Prihatini, “WHO: Hampir 1 Miliar Orang di Dunia Alami Gangguan Kesehatan Mental,” Kompas.com, 2022. https://www.kompas.com/sains/read/2022/06/20/193000823/who--hampir-1-miliar-orang-di-dunia-alami-gangguan-kesehatan-mental?page=all (diakses 24 Agustus 2023).
[4] P. Pandu, “Aplikasi untuk Deteksi Dini Psikosis,” Kompas.id, 2022. https://www.kompas.id/baca/humaniora/2022/11/13/inovasi-iptek-aplikasi-deteksi-dini-psikosis (diakses 24 Agustus 2023).
[5] A. Arif, “Krisis Kesehatan Mental Melonjak di Kalangan Remaja,” Kompas.id, 2023. https://www.kompas.id/baca/humaniora/2023/05/03/krisis-kesehatan-mental-melonjak-di-kalangan-remaja (diakses 24 Agustus 2023).
[6] S. Kaur, K. Kaur, Aprajita, R. Verma, dan Pangkaj, “Impact of Social Media on Mental Health of Adolescents,” J. Pharm. Negat. Results, vol. 13, no. 5, hal. 779–783, 2022, doi: 10.47750/pnr.2022.13.S05.121.
[7] N. Z. Septiana, “Dampak Peggunaan Media Sosial Terhadap Kesehatan Mental Dan Kesejahteraan Sosial Remaja Dimasa Pandemi Covid-19,” Nusant. Res. J. Hasil-hasil Penelit. Univ. Nusant. PGRI Kediri, vol. 8, no. 1, hal. 1–13, 2021, doi: 10.29407/nor.v8i1.15632.
[8] R. Al Yasin, R. R. K. A. Anjani, S. Salsabil, T. Rahmayanti, dan R. Amalia, “Pengaruh Sosial Media Terhadap Kesehatan Mental Dan Fisik Remaja: a Systematic Review,” J. Kesehat. Tambusai, vol. 3, no. 2, hal. 83–90, 2022, doi: 10.31004/jkt.v3i2.4402.
[9] H. D. Jayanti dkk., “2314-8101-1-Pb,” hal. 91–102, 2022.
[10] A. Rosmalina dan T. Khaerunnisa, “Penggunaan Media Sosial dalam Kesehatan Mental Remaja,” Prophet. Prof. Empathy, Islam. Couns. J., vol. 4, no. 1, hal. 49, 2021, doi: 10.24235/prophetic.v4i1.8755.
[11] S. Sadya, “Indonesia Masuk Negara Paling Banyak Main Twitter pada Awal 2023,” dataindonesia.id/, 2023. https://dataindonesia.id/internet/detail/indonesia-masuk-negara-paling-banyak-main-twitter-pada-awal-2023 (diakses 30 Agustus 2023).
[12] Adam, “Demografi Pengguna Twitter di Indonesia Paling Banyak Pria daripada Perempuan,” itworks.id, 2019. https://www.itworks.id/19408/demografi-pengguna-twitter-di-indonesia-paling-banyak-pria-daripada-perempuan.html (diakses 30 Agustus 2023).
[13] E. T. Pusparini, “Mengenal Apa Itu Analisis Sentimen, Tipe dan Cara Kerjanya,” qontak.com, 2023. https://qontak.com/blog/analisis-sentimen-adalah/ (diakses 4 September 2023).
[14] F. V. Sari dan A. Wibowo, “Analisis Sentimen Pelanggan Toko Online Jd.Id Menggunakan Metode Naïve Bayes Classifier Berbasis Konversi Ikon Emosi,” J. SIMETRIS, vol. 10, no. 2, hal. 681–686, 2019.
[15] M. Harahap, B. P. A. Sihombing, O. A. F. Laia, B. T. Saragih, F. Teknologi, dan U. P. Indonesia, “ANALISIS SENTIMEN REVIEW PENJUALAN PRODUK UMKM PADA MACHINE LEARNING Kuandi Dharma,” vol. 5, no. 2, hal. 147–154, 2021.
[16] E. Yuniar, D. Safiroh, dan D. Wahyuningsih, “Implementasi Scraping Data Untuk Sentiment Analysis Pengguna Dompet Digital Dengan Menggunakan Algoritma Machine Learning Implementation of Data Scraping for Sentiment Analysis of Digital,” vol. 2, no. 1, hal. 35–42, 2022, doi: 10.25008/janitra.v2i1.145.
[17] A. I. Putra dan R. R. Santika, “Implementasi Machine Learning dalam Penentuan Rekomendasi Musik dengan Metode Content-Based Filtering,” Edumatic J. Pendidik. Inform., vol. 4, no. 1, hal. 121–130, 2020, doi: 10.29408/edumatic.v4i1.2162.
[18] Badan Pusat Statistik, “Persentase Penduduk yang Mempunyai Keluhan Kesehatan Selama Sebulan Terakhir (Persen), 2020-2022,” Statistik Indonesia, 2022. https://www.bps.go.id/indicator/30/222/1/persentase-penduduk-yang-mempunyai-keluhan-kesehatan-selama-sebulan-terakhir.html (diakses 24 Agustus 2023).
[19] R. Azhar, A. Surahman, dan C. Juliane, “Analisis Sentimen Terhadap Cryptocurrency Berbasis Python TextBlob Menggunakan Algoritma Naïve Bayes,” J. Sains Komput. Inform. (J-SAKTI, vol. 6, no. 1, hal. 267–281, 2022.
[20] K. Verena, S. Toy, Y. A. Sari, dan I. Cholissodin, “Analisis Sentimen Twitter menggunakan Metode Naive Bayes dengan Relevance Frequency Feature Selection ( Studi Kasus: Opini Masyarakat mengenai Kebijakan New Normal ),” vol. 5, no. 11, hal. 5068–5074, 2021.
[21] R. Adinugroho, Perbandingan Rasio Split Data Training Dan Data Testing Menggunakan Metode LSTM Dalam Memprediksi Harga Indeks Saham Asia. 2022. [Daring]. Tersedia pada: https://repository.uinjkt.ac.id/dspace/handle/123456789/67314%0Ahttps://repository.uinjkt.ac.id/dspace/bitstream/123456789/67314/1/RAHMADHAN ADINUGROHO-FST.pdf
[22] A. Tharwat, “Classification assessment methods,” Appl. Comput. Informatics, vol. 17, no. 1, hal. 168–192, 2018, doi: 10.1016/j.aci.2018.08.003.