Optimasi Analisis Sentimen Twitter Tentang Isu Kesehatan Mental dengan Bi-LSTM pada Dataset Tidak Berimbang
Abstract
This study aims to analyze Twitter user sentiments related to mental health issues using the Bidirectional Long Short-Term Memory (BiLSTM) model. The dataset consists of 52,681 entries covering seven mental health categories: Anxiety, Bipolar, Depression, Normal, Personality Disorder, Stress, and Suicidal. The methods used include data pre-processing, data splitting, and model training with class weight adjustment techniques to handle data imbalance. The training results show an increase in accuracy from 16.02% in the first epoch to 88.48% in the 10th epoch, with an evaluation accuracy of 74.21%. The model shows the best performance in the Anxiety class with an F1-score of 0.90. However, the model still experiences limitations in classifying minority classes such as Bipolar and Personality Disorder due to the small amount of data and the complexity of language expressions in these categories. Therefore, an increase in the amount of data and more adaptive language processing techniques are needed to improve model performance in categories with limited data.
Downloads
References
A. Nur Haryanti, M. Bintang Syah Putra, N. Larasati, V. Nureel Khairunnisa, and L. A. Dyah Dewi, “Analisis Kondisi Kesehatan Mental di Indonesia Dan Strategi Penanganannya,” Student Res. J., vol. 2, no. 3, pp. 28–40, 2024, doi: 10.55606/srjyappi.v2i3.1219.
A. Asfahani, E. Yuniarti, L. Husnita, P. Pahmi, and N. S. Jamin, “Peningkatan Kesadaran Masyarakat Tentang Pentingnya Kesehatan Mental Melalui Edukasi Pendidikan Sosial,” Communnity Dev. J., vol. 5, no. 2, pp. 3633–3639, 2024.
N. P. Sari and E. D. Prahastiwi, “Konsep Pemeliharaan Kesehatan Mental Pada Remaja Muslim Melalui Pendidikan Keimanan (Telaah Pemikiran Prof. Dr. Zakiah Daradjat),” J. Pemikir. Keislam. dan Kemanus., vol. 8, no. 2, pp. 45–58, 2024.
Z. A. Rakhman, I. D. Florina, and S. Edy, “Peran Media Sosial Dalam Mendorong Diskusi Terbuka Tentang Kesehatan Mental,” J. Ilmu Komun., vol. 1, no. 1, pp. 34–40, 2024.
A. S. Nandila, “Analisis Sentimen Pada Media Sosial Twitter Terhadap Isu Kesehatan Mental Pasca Pandemi Covid-19 Dengan Menggunakan Metode Naïve Bayes & Support Vector Machine (SVM),” Universitas Nasional, 2024.
Y. Astari, Afiyati, and S. W. Rozaqi, “Analisis Sentimen Multi-Class pada Sosial media Menggunakan Metode Long Short-Term Memory (LSTM),” J. Linguist. Komputasional, vol. 3, no. 2, p. 6, 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.
H. H. Windjatika and W. Maharani, “Depression Detection on Social Media Twitter Using Long Short-Term Memory,” J. Media Inform. Budidarma, vol. 6, no. 4, p. 1835, 2022, doi: 10.30865/mib.v6i4.4457.
L. Yosia Wibowo, N. Annisa, P. Ananda Khairunnisa, V. Handrianus Pranatawijaya, and R. Priskila, “Implementasi Long Short-Term Memory Dalam Analisis Sentimen Pengguna Aplikasi Twitter Yang Mengandung Ujaran Kebencian,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 3, pp. 3170–3174, 2024, doi: 10.36040/jati.v8i3.9654.
A. Karami, M. Lundy, F. Webb, and Y. K. Dwivedi, “Twitter and Research: A Systematic Literature Review through Text Mining,” IEEE Access, vol. 8, pp. 67698–67717, 2020, doi: 10.1109/ACCESS.2020.2983656.
R. W. Pratiwi, Y. Sari, and Y. Suyanto, “Attention-Based BiLSTM for Negation Handling in Sentimen Analysis,” IJCCS (Indonesian J. Comput. Cybern. Syst.), vol. 14, no. 4, p. 397, 2020, doi: 10.22146/ijccs.60733.
M. F. B. A. A. Syam, G.H.M., A. Salim, D. F. Surianto, “Analisis Teknik Preprocessing pada Sentimen Masyarakat Terkait Konflik Israel-Palestina Menggunakan Support Vector Machine,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran Inform., vol. 9, no. 3, pp. 1464–1472, 2024.
M. A. Nur and N. Wardhani, “Optimasi Normalisasi Kata Pada Data Twitter Untuk Meningkatkan Akurasi Analisis Sentimen (Studi Kasus Respon Masyarakat Terhadap Layanan Teman Bus),” J. Fokus Elektroda (Energi List. Telekomun. Komputer, Elektron. dan Kendali), vol. 7, no. 4, pp. 237–243, 2022.
S. J. Angelina, A. Bijaksana, P. Negara, and H. Muhardi, “Analisis Pengaruh Penerapan Stopword Removal Pada Performa Klasifikasi Sentimen Tweet Bahasa Indonesia,” JUARA (J. Apl dan Ris. Inform.), vol. 02, no. 1, pp. 165–173, 2023, doi: 10.26418/juara.v2i1.69680.
C. Herdian, A. Kamila, and I. G. Agung Musa Budidarma, “Studi Kasus Feature Engineering Untuk Data Teks: Perbandingan Label Encoding dan One-Hot Encoding Pada Metode Linear Regresi,” Technol. J. Ilm., vol. 15, no. 1, p. 93, 2024, doi: 10.31602/tji.v15i1.13457.
R. Onsu, D. febrian Sengkey, and F. D. Kambey, “Implementasi Bi-LSTM Dengan Ekstraksi Fitur Word2vec Untuk Pengembangan Analisis Sentimen Aplikasi Identitas Kependudukan Digital,” J. Teknol. Terpadu, vol. 10, no. 1, pp. 46–55, 2024.
A. Saputra, R. C. Sigitta Hariyono, and N. M. Saraswati, “Analisis Sentimen Pengguna Aplikasi MyPertamina Menggunakan Algoritma Bidirectional Long Short Term Memory,” J. Eksplora Inform., vol. 13, no. 2, pp. 156–163, 2024, doi: 10.30864/eksplora.v13i2.973.
Y. Karyadi, “Prediksi Kualitas Udara Dengan Metoda LSTM, Bidirectional LSTM, dan GRU,” JATISI (Jurnal Tek. Inform. dan Sist. Informasi), vol. 9, no. 1, pp. 671–684, 2022, doi: 10.35957/jatisi.v9i1.1588.
Z. Hameed and B. Garcia-Zapirain, “Sentiment Classification Using a Single-Layered BiLSTM Model,” IEEE Access, vol. 8, pp. 73992–74001, 2020, doi: 10.1109/ACCESS.2020.2988550.
Teknokrat, “Optimalkan Analisis Data dengan Pentingnya Pra-pemrosesan Data Teks,” FTIK Teknokrat. Accessed: Jan. 20, 2025. [Online]. Available: https://ftik.teknokrat.ac.id/optimalkan-analisis-data-dengan-pentingnya-pra-pemrosesan-data-teks/
DqLab, “Menggali Sentimen dengan Sistem Operasi SQL,” DQLab. Accessed: Jan. 20, 2025. [Online]. Available: https://dqlab.id/menggali-sentimen-dengan-sistem-operasi-sql
A. Kartika Sari, I. Akhmad, N. A. Dinda, Islamiyah, and G. Stephanie Elfriede, “Analisis Sentimen Twitter Menggunakan Machine Learning untuk Identifikasi Konten Negatif,” Adopsi Teknol. dan Sist. Inf., vol. 3, no. 1, pp. 64–73, 2024, doi: 10.30872/atasi.v3i1.1373.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Optimasi Analisis Sentimen Twitter Tentang Isu Kesehatan Mental dengan Bi-LSTM pada Dataset Tidak Berimbang
Pages: 2424-2435
Copyright (c) 2025 Indah Rani Fatmawati, Muhammad Pajar Kharisma Putra

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment 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 acknowledgment 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 (Refer to The Effect of Open Access).