COMPARISON OF RANDOM FOREST, SUPPORT VECTOR MACHINE AND NAIVE BAYES ALGORITHMS TO ANALYZE SENTIMENT TOWARDS MENTAL HEALTH STIGMA

  • Putri Elisa Information Systems, Faculty of Engineering and Computer Science, Universitas Teknokrat Indonesia, Indonesia
  • Auliya Rahman Isnain Information Systems, Faculty of Engineering and Computer Science, Universitas Teknokrat Indonesia, Indonesia
Keywords: Mental Health, Naive Bayes, Random Forest, Sentiment Analysis, Support Vector Machine

Abstract

Advances in technology, especially the internet, have significantly changed the way people communicate, including social media. Social media facilitates more effective and efficient online communication. Twitter has 18.45 million users in Indonesia by 2022. Discussion of mental health stigma on twitter, increased 17% in 2021 compared to the previous year. Lifestyle transformation, social pressures, and technological advancements have created new challenges in maintaining individual mental health. Discussions of mental health issues have become pros and cons on twitter. The tendency of twitter users in posting content can be known by means of sentiment analysis. Therefore, sentiment analysis can be used to classify comments and tweets related to mental health stigma into negative, positive and neutral. So, it is expected to provide a number of significant benefits in the aspect of managing mental health issues. The methods used to analyze sentiment towards mental health stigma are Random Forest, Support Vector Machine (SVM) and Naïve Bayes algorithms. Based on the research that has been done, it produces 3,095 data for the period 2020-2023. After preprocessing and labeling the data, 1,635 data (negative class), 633 data (positive class) and 208 data (neutral class) were obtained. The SVM model test results show an accuracy of 86.11%, the Random Forest model shows an accuracy of 82.55%, while the Naive Bayes model shows an accuracy of 78.19%. Therefore, it can be concluded that SVM has the best performance in classifying tweets containing mental health stigma.

Downloads

Download data is not yet available.

References

D. Nur, N. S. Ibraya, and N. R. Marsuki, “Dampak Sosiologi Digital Terhadap Perubahan Sosial Budaya Pada Masyarakat Masa Depan Universitas Muhammadiyah Makassar interaksi sosial dan dinamika masyarakat . Berbagai perubahan khususnya dalam bidang,” J. Pendidik. Dan Ilmu Sos., vol. 2, no. 2, pp. 123–135, 2024.

M. Fachriza and M. Munawar, “Analisis Sentimen Kalimat Depresi Pada Pengguna Twitter Dengan Naive Bayes, Support Vector Machine, Random Forest,” Komputek, pp. 49–58, 2023, [Online]. Available: https://studentjournal.umpo.ac.id/index.php/komputek/article/view/2218

R. R. Septa and B. Kusumasari, “Opini Publik Terkait Tren Isu Kesehatan: Analisis Konten pada Twitter dan Portal Berita di Yogyakarta,” J. Adm. Publik, vol. 1, pp. 34–43, 2021, doi: 10.47753/pjap.v2i2.34.

D. Ayuningtyas and M. Rayhani, “Analisis Situasi Kesehatan Mental Pada Masyarakat Di Indonesia Dan Strategi Penanggulangannya,” J. Ilmu Kesehat. Masy., vol. 9, no. 1, pp. 1–10, 2018.

U. A. Annury, F. Yuliana, V. A. Z. Suhadi, and C. S. A. K. Karlina, “Dampak Self Diagnose Pada Kondisi Mental Health Mahasiswa Universitas Negeri Surabaya,” Jur. Ilmu Ilmu Sos. FISH Univ. Negeri Surabaya, pp. 481–486, 2022.

M. L. Wicaksono, R. Rusdah, and D. Apriana, “Sentiment Analysis Of Mental Health Using K-Nearest Neighbors On Social Media Twitter,” Bit (Fakultas Teknol. Inf. Univ. Budi Luhur), vol. 19, no. 2, p. 98, 2022, doi: 10.36080/bit.v19i2.2042.

F. Anwar and P. Julia, “Analisis Strategi Pembinaan Kesehatan Mental Oleh Guru Pengasuh Sekolah Bersama si Aceh Besar Pada Masa Pandemi,” J. EDUKASI J. Bimbing. Konseling, vol. 7, no. 1, pp. 64–83, 2021.

K. Aulia and L. Amelia, “Analisis Sentimen Twitter Pada Isu Mental Health Dengan Algoritma Klasifikasi Naive Bayes,” Siliwangi J. (Seri Sains Teknol., vol. 6, no. 2, pp. 60–65, 2020.

A. Ilham and W. Pramusinto, “Analisis Sentimen Masyarakat Terhadap Kesehatan Mental Pada Twitter Menggunakan Algoritme K-Nearest Neighbor,” Pros. Semin. Nas. Mhs. Fak. …, vol. 2, no. September, pp. 539–547, 2023, [Online]. Available: http://senafti.budiluhur.ac.id/index.php/senafti/article/view/792%0Ahttp://senafti.budiluhur.ac.id/index.php/senafti/article/download/792/527

F. Andriani, “Fenomena Social Climber Melalui Twitwar,” J. Pustaka Komun., vol. 1, no. 2, pp. 349–360, 2018, [Online]. Available: https://journal.moestopo.ac.id/index.php/pustakom/article/view/713

S. F. Pratama, R. Andrean, and A. Nugroho, “Analisis Sentimen Twitter Debat Calon Presiden Indonesia Menggunakan Metode Fined-Grained Sentiment Analysis,” JOINTECS (Journal Inf. Technol. Comput. Sci., vol. 4, no. 2, p. 39, 2019, doi: 10.31328/jointecs.v4i2.1004.

E. R. Lidinillah, T. Rohana, and A. R. Juwita, “Analisis sentimen twitter terhadap steam menggunakan algoritma logistic regression dan support vector machine Steam sentiment analysis using logistic regression algorithm and support vector machine,” vol. 10, pp. 154–164, 2023, doi: 10.37373/tekno.v10i2.440.

P. Arsi and R. Waluyo, “Analisis Sentimen Wacana Pemindahan Ibu Kota Indonesia Menggunakan Algoritma Support Vector Machine (SVM),” J. Teknol. Inf. dan Ilmu Komput., vol. 8, no. 1, p. 147, 2021, doi: 10.25126/jtiik.0813944.

Y. Femilia Nugraini, R. Rohmat Saedudin, and R. Andreswari, “Implementasi Data Mining Dalam Kasus Mental Health Pada Sosial Media Twitter Menggunakan Metode Naive Bayes Implementation of Data Mining in the Case of Mental Health on Social Media Twitter Using Naive Bayes Method,” e-Proceeding Eng., vol. 8, no. 5, pp. 9260–9265, 2021, [Online]. Available: https://repository.telkomuniversity.ac.id/pustaka/files/170554/jurnal_eproc/implementasi-data-mining-dalam-kasus-mental-health-pada-sosial-media-twitter-menggunakan-metode-naive-bayes.pdf

K. Yan, D. Arisandi, and T. Tony, “Analisis Sentimen Komentar Netizen Twitter Terhadap Kesehatan Mental Masyarakat Indonesia,” J. Ilmu Komput. dan Sist. Inf., vol. 10, no. 1, 2022, doi: 10.24912/jiksi.v10i1.17865.

S. Mulyani and R. Novita, “Implementation of the Naive Bayes Classifier Algorithm for Classification of Community Sentiment About Depression on Youtube,” J. Tek. Inform., vol. 3, no. 5, pp. 1355–1361, 2022, doi: 10.20884/1.jutif.2022.3.5.374.

F. Darmawan, M. Joe, Y. I. Kurniawan, and L. Afuan, “Analisis Sentimen Kemungkinan Depresi dan Kecemasan pada Twitter Menggunakan Support Vector Machine,” J. Eksplora Inform., vol. 13, no. 1, pp. 24–36, 2023, doi: 10.30864/eksplora.v13i1.854.

Y. Fauziah, S. Saifullah, and A. S. Aribowo, “Design Text Mining for Anxiety Detection using Machine Learning based-on Social Media Data during COVID-19 pandemic,” Proceeding LPPM UPN “Veteran” Yogyakarta Conf. Ser. 2020 – Eng. Sci. Ser., vol. 1, no. 1, pp. 253–261, 2020, [Online]. Available: http://proceeding.rsfpress.com/index.php/ess/article/view/117

S. Algifari Rismawan and Y. Syahidin, “Implementasi Website Berita Online Menggunakan Metode Crawling Data Dengan Bahasa Pemrograman Python,” J. Tek. Inform. dan Sist. Inf., vol. 10, no. 3, pp. 167–178, 2023, [Online]. Available: https://doi.org/10.35957/jatisi.v10i3.4902

A. Nofandi, N. Setiawan, and D. Brata, “Analisis Sentimen Ulasan Pelanggan dengan Metode Support Vector Machine (SVM) untuk Peningkatan Kualitas Layanan pada Restoran Warung Wareg,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 7, no. 1, pp. 458–466, 2023, [Online]. Available: http://j-ptiik.ub.ac.id

A. R. Ismail and R. B. F. Hakim, “Implementasi Lexicon Based Untuk Analisis Sentimen Dalam Menentukan Rekomendasi Pantai Di DI Yogyakarta Berdasarkan Data Twitter,” Emerg. Stat. Data Sci. J., vol. 1, no. 1, pp. 37–46, 2023, doi: 10.20885/esds.vol1.iss.1.art5.

N. Yusliani, A. Yuhafiz, M. D. Marieska, and A. S. Utami, “Analisis Sentimen di Twitter Menggunakan Algoritma Artificial Neural Network,” J. Jupiter, vol. 15, no. 1, pp. 725–731, 2023.

R. Vincent et al., “Perbandingan Klasifikasi Naive Bayes Dan Support Vector Machine Dalam Analisis Sentimen Dengan Multiclass Di Twitter,” J. Mhs. Tek. Inform., vol. 7, no. 4, pp. 2496–2505, 2023.

S. Amaliah, M. Nusrang, and A. Aswi, “Penerapan Metode Random Forest Untuk Klasifikasi Varian Minuman Kopi di Kedai Kopi Konijiwa Bantaeng,” VARIANSI J. Stat. Its Appl. Teach. Res., vol. 4, no. 3, pp. 121–127, 2022, doi: 10.35580/variansiunm31.

J. Melvin and A. Soraya, “Analisis Perbandingan Algoritma XGBoost dan Algoritma Random Forest Ensemble Learning pada Klasifikasi Keputusan Kredit,” J. Ris. Rumpun Mat. dan Ilmu Pengetah. Alam, vol. 2, no. 2, pp. 87–103, 2023.

I. Kurniawan, D. C. P. Buani, A. Abdussomad, W. Apriliah, and R. A. Saputra, “Implementasi Algoritma Random Forest Untuk Menentukan Penerima Bantuan Raskin,” J. Teknol. Inf. dan Ilmu Komput., vol. 10, no. 2, pp. 421–428, 2023, doi: 10.25126/jtiik.20231026225.

Rayuwati, Husna Gemasih, and Irma Nizar, “Implementasi Algoritma Naive Bayes Untuk Memprediksi Tingkat Penyebaran Covid,” Jural Ris. Rumpun Ilmu Tek., vol. 1, no. 1, pp. 38–46, 2022, doi: 10.55606/jurritek.v1i1.127.

R. Nurhidayat and K. E. Dewi, “Penerapan Algoritma K-Nearest Neighbor Dan Fitur Ekstraksi N-Gram Dalam Analisis Sentimen Berbasis Aspek,” Komputa J. Ilm. Komput. dan Inform., vol. 12, no. 1, pp. 91–100, 2023, doi: 10.34010/komputa.v12i1.9458.

M. Daffa, A. Fahreza, A. Luthfiarta, M. Rafid, M. Indrawan, and A. Nugraha, “Analisis Sentimen : Pengaruh Jam Kerja Terhadap Kesehatan Mental Generasi Z,” J. Appl. Comput. Sci. Technol., vol. 5, no. 1, pp. 16–25, 2024.

N. Fathirachman Mahing, A. Lazuardi Gunawan, A. Foresta Azhar Zen, F. Abdurrachman Bachtiar, and S. Agung Wicaksono, “Klasifikasi Tingkat Stress dari Data Berbentuk Teks dengan Menggunakan Algoritma Support Vector Machine (SVM) dan Random Forest,” J. Teknol. Inf. dan Ilmu Komput., vol. 10, no. 7, pp. 1527–1536, 2023, doi: 10.25126/jtiik.1078010.

S. Mutmainah, “Kemungkinan Depresi Dari Postingan Pada Sosial Media,” J. Sains, Nalar, dan Apl. Teknol. Inf., vol. 1, no. 2, pp. 17–23, 2022, doi: 10.20885/snati.v1i2.11.

Published
2024-02-24
How to Cite
[1]
P. Elisa and A. R. Isnain, “COMPARISON OF RANDOM FOREST, SUPPORT VECTOR MACHINE AND NAIVE BAYES ALGORITHMS TO ANALYZE SENTIMENT TOWARDS MENTAL HEALTH STIGMA”, J. Tek. Inform. (JUTIF), vol. 5, no. 1, pp. 321-329, Feb. 2024.