Identifikasi Indikasi Risiko Depresi pada Unggahan Media Sosial X Menggunakan Natural Language Processing dan Algoritma Random Forest


Authors

  • Arif Siswandi Universitas Pelita Bangsa, Bekasi, Indonesia
  • Arif Susilo Universitas Pelita Bangsa, Bekasi, Indonesia

DOI:

https://doi.org/10.47065/bulletincsr.v6i2.1026

Keywords:

Natural Language Processing; Social Media Text Analysis; Depressive Expressions; Machine Learning; Random Forest

Abstract

Depression among university students has become an important mental health concern due to its potential impact on quality of life and academic performance. Social media platform X, as a text-based communication medium, provides a space for spontaneous expression that may reflect users’ emotional states. This study aims to analyze linguistic patterns associated with indicative depressive expressions in social media posts using a Natural Language Processing (NLP) approach and the Random Forest algorithm. Data were collected through web scraping between January and November 2024 using keywords conceptually derived from the Patient Health Questionnaire-9 (PHQ-9) indicators and adapted to linguistic expressions commonly used in social media communication. From an initial collection of 36,081 posts, several filtering stages were conducted, including duplicate removal, language filtering, and elimination of irrelevant content, resulting in a final dataset of 1,070 posts used in this study. The high filtering rate indicates that many scraped posts did not directly represent relevant emotional expressions. The dataset was manually labeled into three indicative categories of depressive expressions: mild, moderate, and severe. The analytical process included text preprocessing, TF-IDF feature extraction, and classification modeling using the Random Forest algorithm. The evaluation results show an accuracy of 97%. However, this value should be interpreted cautiously because model performance may be influenced by dataset characteristics and the manual labeling process. Therefore, the proposed model should be regarded as an exploratory approach for identifying linguistic patterns associated with emotional expressions in social media text rather than a clinical diagnostic tool for depression.

Downloads

Download data is not yet available.

References

A. S. S. Fitriyani and V. R. Setyaning Nastiti, “Pendekatan Linguistik dalam Klasifikasi Emosi Depresi untuk Deteksi Dini Kesehatan Mental di Reddit,” Jurnal Algoritma, vol. 22, no. 2, Nov. 2025, doi: 10.33364/algoritma/v.22-2.2927.

O. Christopher Adah and E. Adashona Obiamaka, “An Analysis of the Non-linear Relationship between Test Anxiety and Academic Achievement of Secondary School Students,” International Journal of Depression and Anxiety, vol. 8, no. 1, Jun. 2025, doi: 10.23937/2643-4059/1710042.

M. Z. A. Rustam and L. Nurlela, “Gangguan Kecemasan dengan Menggunakan Self Reporting Questionaire (SRQ-29) di Kota Surabaya,” Jurnal Kesehatan Masyarakat Mulawarman (JKMM), vol. 3, no. 1, p. 39, Aug. 2021, doi: 10.30872/jkmm.v3i1.5752.

M. Y. Dhinora and E. Mailoa, “Analisa Tweet Mahasiswa untuk Deteksi Gejala Depresi dengan Penerapan Natural Language Processing,” Jurnal Indonesia?: Manajemen Informatika dan Komunikasi, vol. 6, no. 2, pp. 1193–1211, May 2025, doi: 10.63447/jimik.v6i2.1405.

F. Apriliani and W. Maharani, “Depression Detection on Social Media Twitter using XLnet Method,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 8, no. 1, pp. 172–180, Feb. 2023, doi: 10.29100/jipi.v8i1.3345.

D. Arsyanda, S. Rodiah, and A. S. Rohman, “Peran akun autobase X (twitter) dalam memenuhi kebutuhan informasi followers,” Pustaka Karya?: Jurnal Ilmiah Ilmu Perpustakaan dan Informasi, vol. 13, no. 1, pp. 233–241, Jun. 2025, doi: 10.18592/pk.v13i1.15927.

D. Arsyanda, S. Rodiah, and A. S. Rohman, “Peran akun autobase X (twitter) dalam memenuhi kebutuhan informasi followers,” Pustaka Karya?: Jurnal Ilmiah Ilmu Perpustakaan dan Informasi, vol. 13, no. 1, pp. 233–241, Jun. 2025, doi: 10.18592/pk.v13i1.15927.

L. I. Nitami, “Perkembangan Media Sosial Terhadap Perubahan Sosial Masyarakat Di Indonesia Tahun 2000-Sekarang,” KALA MANCA: JURNAL PENDIDIKAN SEJARAH, vol. 11, no. 2, pp. 69–74, Dec. 2023, doi: 10.69744/kamaca.v11i2.214.

M. R. Sudrajat and M. Zakariyah, “Penerapan Natural Language Processing dan Machine Learning untuk Prediksi Stres Siswa SMA Berdasarkan Analisis Teks,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 3, Dec. 2024, doi: 10.47065/bits.v6i3.6180.

P. Ta, N. Tran, H. Nguyen, and H. D. Nguyen, “Detecting signs of depression on social media: A machine learning analysis and evaluation,” Sustainable Futures, vol. 10, p. 100827, Dec. 2025, doi: 10.1016/j.sftr.2025.100827.

V. Oktaviani, N. Rosmawarni, and M. P. Muslim, “Perbandingan Kinerja Random Forest Dan Smote Random Forest Dalam Mendeteksi Dan Mengukur Tingkat Stres Pada Mahasiswa Tingkat Akhir,” Informatik?: Jurnal Ilmu Komputer, vol. 20, no. 1, pp. 43–49, Apr. 2024, doi: 10.52958/iftk.v20i1.9158.

B. C. Mateus, M. Mendes, J. T. Farinha, and A. Martins, “Hybrid Deep Learning for Predictive Maintenance: LSTM, GRU, CNN, and Dense Models Applied to Transformer Failure Forecasting,” Energies (Basel)., vol. 18, no. 21, p. 5634, Oct. 2025, doi: 10.3390/en18215634.

K. Rahayu, V. Fitria, D. Septhya, R. Rahmaddeni, and L. Efrizoni, “Klasifikasi Teks untuk Mendeteksi Depresi dan Kecemasan pada Pengguna Twitter Berbasis Machine Learning,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 3, no. 2, pp. 108–114, Sep. 2023, doi: 10.57152/malcom.v3i2.780.

T. T. Widowati and M. Sadikin, “Analisis Sentimen Twitter terhadap Tokoh Publik dengan Algoritma Naive Bayes dan Support Vector Machine,” Simetris: Jurnal Teknik Mesin, Elektro dan Ilmu Komputer, vol. 11, no. 2, pp. 626–636, Oct. 2021, doi: 10.24176/simet.v11i2.4568.

N. H. Kim, J. M. Kim, D. M. Park, S. R. Ji, and J. W. Kim, “Analysis of depression in social media texts through the Patient Health Questionnaire-9 and natural language processing,” Digit. Health, vol. 8, p. 205520762211142, Jan. 2022, doi: 10.1177/20552076221114204.

F. Apriliani and W. Maharani, “Depression Detection on Social Media Twitter using XLnet Method,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 8, no. 1, pp. 172–180, Feb. 2023, doi: 10.29100/jipi.v8i1.3345.

G. F. Situmorang and R. Purba, “Deteksi Potensi Depresi dari Unggahan Media Sosial X Menggunakan IndoBERT,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 2, pp. 649–661, Sep. 2024, doi: 10.47065/bits.v6i2.5496.

F. Fatkhurrohman, B. I. Nugroho, and N. Fadillah, “Analisis Sentimen Program Makan Bergizi Gratis Pemerintah RI Melalui Twitter Menggunakan Metode SVM,” RIGGS: Journal of Artificial Intelligence and Digital Business, vol. 4, no. 3, pp. 3906–3917, Aug. 2025, doi: 10.31004/riggs.v4i3.2533.

A. B. Aditya, S. Samsudin, W. P. Rizki, M. Mahendra, and A. Setiawan, “Analisis Sentimen Ulasan Aplikasi Gojek Menggunakan Support Vector Machine Dan Random Forest,” Jurnal Informatika Terpadu, vol. 11, no. 2, pp. 134–143, Nov. 2025, doi: 10.54914/jit.v11i2.1884.

M. Y. Dhinora and E. Mailoa, “Analisa Tweet Mahasiswa untuk Deteksi Gejala Depresi dengan Penerapan Natural Language Processing,” Jurnal Indonesia?: Manajemen Informatika dan Komunikasi, vol. 6, no. 2, pp. 1193–1211, May 2025, doi: 10.63447/jimik.v6i2.1405.

S. P. Aleng, B. J. D. Sitompul, and O. A. Lantang, “Predicting Depression Levels Among Final-Year Students Using CatBoost Algorithm,” Jurnal Teknik Elektro dan Komputer, vol. 14, no. 2, pp. 71–82, Dec. 2025, doi: 10.35793/jtek.v14i2.62464.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Identifikasi Indikasi Risiko Depresi pada Unggahan Media Sosial X Menggunakan Natural Language Processing dan Algoritma Random Forest

Dimensions Badge

ARTICLE HISTORY

Published: 2026-02-28

Abstract View: 62 times
PDF Download: 49 times

How to Cite

Siswandi, A., & Susilo, A. (2026). Identifikasi Indikasi Risiko Depresi pada Unggahan Media Sosial X Menggunakan Natural Language Processing dan Algoritma Random Forest . Bulletin of Computer Science Research, 6(2), 813-822. https://doi.org/10.47065/bulletincsr.v6i2.1026

Issue

Section

Articles