Deteksi Stres dan Depresi Unggahan Media Sosial dengan Machine Learning

Authors

DOI:

https://doi.org/10.37859/jf.v15i1.9067
Keywords: Depresi, Stress, SHAP, SVM, NLP

Abstract

Penelitian ini menyajikan sebuah model pembelajaran mesin yang mengintegrasikan Support Vector Machine (SVM), Natural Language Processing (NLP), dan SHapley Additive exPlanations (SHAP) untuk mendeteksi stres dan depresi dari unggahan di Twitter. Dataset ini terdiri dari postingan yang dikumpulkan selama satu tahun terakhir, yang dilabeli ke dalam kategori stres, depresi, dan netral. Teknik NLP-tokenization, penghilangan stopword, stemming, dan Term Frequency-Inverse Document Frequency (TF-IDF)-diterapkan untuk membersihkan teks dan mengekstrak fitur-fitur yang relevan. Langkah-langkah ini memastikan hanya kata-kata yang bermakna yang memengaruhi klasifikasi, sehingga meningkatkan kinerja prediktif. SVM berfungsi sebagai pengklasifikasi utama karena keefektifannya dalam data teks berdimensi tinggi. SHAP meningkatkan kemampuan interpretasi dengan menyoroti fitur-fitur berpengaruh yang mendorong prediksi, sehingga meningkatkan transparansi. Hasil penelitian menunjukkan bahwa kata-kata seperti “stres”, “lelah”, dan “cemas” sangat mengindikasikan stres, sedangkan “depresi”, “kecewa”, dan “menyerah” menandakan kecenderungan depresi. Frasa seperti “lelah secara mental” semakin mendukung proses identifikasi. Model ini mencapai akurasi 96,44%, dengan presisi, recall, dan skor F1 yang tinggi (rata-rata 96%). Matriks kebingungan mengkonfirmasi keefektifan model dalam mengklasifikasikan tiga kategori dengan kesalahan minimal. Integrasi NLP, SVM, dan SHAP tidak hanya meningkatkan akurasi klasifikasi, tetapi juga meningkatkan penjelasan, menjadikan model ini alat yang menjanjikan untuk deteksi dini dan pemahaman kondisi kesehatan mental melalui analisis media sosial.

Downloads

Download data is not yet available.

Author Biography

Kusrini, Universitas AMIKOM Yogyakarta

Kusrini is a professor from Universitas AMIKOM Yogyakarta Indonesia. She finished her doctoral program in the Computer Science Study Program from Universitas Gadjah Mada Yogyakarta Indonesia in 2010. She is interested in exploring many things about machine learning and other artificial intelligence field. She also loves doing research about decision support system and database. She is member of the IEEE and IEEE Systems, Man, and Cybernetics Society. 

References

C. V. Lotulung and I. G. Purnawinadi, “Deteksi Dini Depresi Mahasiswa Baru Jurusan Keperawatan,” Jurnal Ilmu Pendidikan dan Psikologi, vol. 4, no. 2, 2024, doi: https://doi.org/10.51878/paedagogy.v4i2.3042.

Y. Sulistyorini, Mahmudah, and N. Puspitasari, “Peningkatan Kemampuan Deteksi Dini Depresi pada Ibu Hamil di Kota Surabaya,” Jurnal Ilmiah Pengabdian kepada Masyarakat, vol. 8, no. 3, pp. 469–476, 2023, doi: https://doi.org/10.33084/pengabdianmu.v8i3.4469.

A. Ahmed et al., “Machine learning models to detect anxiety and depression through social media: A scoping review,” Computer Methods and Programs in Biomedicine Update, vol. 2, 2022, doi: https://doi.org/10.1016/j.cmpbup.2022.100066.

G. Gunasekar, S. G. Moorthy, K. Chakrapani, and G. Ponsam, “Early Detection of Depression from Social Media Data Using Machine Learning Algorithms,” in 2020 International Conference on Power, Energy, Control and Transmission Systems (ICPECTS), Chennai: IEEE, 2020, pp. 1–6. doi: 10.1109/ICPECTS49113.2020.9336974.

E. Z. Heanoy and N. R. Brown, “Impact of Natural Disasters on Mental Health: Evidence and Implications,” Healthcare, vol. 12, no. 18, 2024, doi: 10.3390/healthcare12181812.

A. Sood, D. Sharma, M. Sharma, and R. Dey, “Prevalence and repercussions of stress and mental health issues on primary and middle school students: a bibliometric analysis,” Frontiers in Psychiatry, vol. 15, 2024, doi: https://doi.org/10.3389/fpsyt.2024.1369605.

S. Chancellor and M. De Choudhury, “Methods in Predictive Techniques for Mental Health Status on Social Media: A Critical Review,” NPJ Digital Medicine, vol. 3, no. 43, 2020, [Online]. Available: https://www.nature.com/articles/s41746-020-0233-7

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

S. Mutmainah, “Kemungkinan Depresi dari Postingan pada Media Sosial,” Jurnal Sains, Nalar, dan Aplikasi Teknologi Informasi, vol. 1, no. 2, 2022, doi: 10.20885/snati.v1i2.11.

L. Ilias, S. Mouzakitis, and D. Askounis, “Calibration of Transformer-Based Models for Identifying Stress and Depression in Social Media,” IEEE Transactions On Computational Social Systems, vol. 11, no. 2, pp. 1979–1990, 2024, doi: 10.1109/TCSS.2023.3283009.

S. Dabhane and P. M. Chawan, “Depression Detection on Social Media using Machine Learning Techniques,” International Journal for Scientific Research & Development, vol. 9, no. 4, pp. 291–294, 2021.

F. A. Bakar, N. M. Nawi, and A. A. Hezam, “Predicting Depression Using Social Media Posts,” Journal of Soft Computing and Data Mining, vol. 2, no. 1, pp. 39–48, 2021, doi: https://doi.org/10.30880/jscdm.2021.02.02.004.

S. Inamdar, R. Chapekar, S. Gita, and B. Pradhan, “Machine Learning Driven Mental Stress Detection on Reddit Posts Using Natural Language Processing,” Springer Human-Centric Intelligent, vol. 3, no. 2, pp. 80–91, 2023, doi: 10.1007/s44230-023-00020-8.

N. Paul E and S. Juliet, “Comparative Analysis of Machine Learning Techniques for Mental Health Prediction,” in 2023 8th International Conference on Communication and Electronics Systems (ICCES), Coimbatore, India: IEEE, 2023, pp. 1–6. doi: 10.1109/ICCES57224.2023.10192763.

G. F. Situmorang and R. Purba, “Deteksi Potensi Depresi dari Unggahan Media Sosial X Menggunakan Teknik NLP dan Model IndoBERT,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 2, 2024, doi: https://doi.org/10.47065/bits.v6i2.5496.

A. Le Glaz et al., “Machine Learning and Natural Language Processing in Mental Health: Systematic Review,” Journal of Medical Internet Research, vol. 23, no. 5, 2021, doi: 10.2196/15708.

T. Zhang, A. M. Schoene, Shaoxiong Ji, and S. Ananiadou, “Natural language processing applied to mental illness detection: a narrative review,” npj Digital Medicine, vol. 5, no. 46, 2022, doi: https://doi.org/10.1038/s41746-022-00589-7.

H. Duong and T. Nguyen‑Thi, “A review: Preprocessing Techniques and Data Augmentation for Sentiment Analysis,” Computational Social Networks, vol. 8, no. 1, 2021, doi: https://doi.org/10.1186/s40649-020-00080-x.

W. L. L. Phyu, H. M. S. Naing, and W. P. Pa, “Improving the Performance of Low-resourced Speaker Identification with Data Preprocessing,” Journal of ICT Research and Applications, vol. 17, no. 3, 2023, doi: https://doi.org/10.5614/itbj.ict.res.appl.2023.17.3.1.

B. Tahayna, R. K. Ayyasamy, and R. Akbar, “Context-Aware Sentiment Analysis using Tweet Expansion Method,” Journal of ICT Research and Applications, vol. 16, no. 2, 2022, doi: https://doi.org/10.5614/itbj.ict.res.appl.2022.16.2.3.

S. A. Utiarahman and A. M. M. Pratama, “Penerapan Support Vector Machine dan Random Forest ClassifierUntuk Klasifikasi Tingkat Obesitas,” Jurnal FASILKOM, vol. 14, no. 3, 2024, doi: https://doi.org/10.37859/jf.v14i3.8104.

O. C. Atalaya et al., “Supervised learning using support vector machine applied to sentiment analysis of teacher performance satisfaction,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 28, no. 1, pp. 516–524, 2022, doi: http://doi.org/10.11591/ijeecs.v28.i1.pp516-524.

V. Bidve et al., “Use of explainable AI to interpret the results of NLP models for sentimental analysis,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 35, no. 1, pp. 511–519, 2024, doi: http://doi.org/10.11591/ijeecs.v35.i1.pp511-519.

N. Nordin, Z. Zainol, M. H. M. Noor, and L. F. Chan, “An explainable predictive model for suicide attempt risk using an ensemble learning and Shapley Additive Explanations (SHAP) approach,” Asian Journal of Psychiatry, vol. 79, 2023, doi: https://doi.org/10.1016/j.ajp.2022.103316.

Y. Nohara, K. Matsumoto, H. Soejima, and N. Nakashima, “Explanation of machine learning models using shapley additive explanation and application for real data in hospital,” Computer Methods and Programs in Biomedicine, vol. 214, 2022, doi: https://doi.org/10.1016/j.cmpb.2021.106584.

S. M. Lundberg et al., “From local explanations to global understanding with explainable AI for trees,” Nature Machine Intelligence, vol. 2, pp. 55–67, 2020, doi: https://doi.org/10.1038/s42256-019-0138-9.

M. Haqqi, L. Rochmah, A. D. Safitri, R. A. Pratama, and Tarwoto, “ImplementationOf Machine Learning To IdentifyTypes Of Waste Using CNN Algorithm,” Jurnal FASILKOM, vol. 14, no. 3, pp. 761–765, 2024, doi: https://doi.org/10.37859/jf.v14i3.8116.

C. A. N. Agustina, R. Novita, Mustakim, and N. E. Rozanda, “The Implementation of TF-IDF and Word2Vec on Booster Vaccine Sentiment Analysis Using Support Vector Machine Algorithm,” Procedia Computer Science, vol. 234, pp. 156–163, 2024, doi: https://doi.org/10.1016/j.procs.2024.02.162.

M. Liang and T. Niu, “Research on Text Classification Techniques Based on Improved TF-IDF Algorithm and LSTM Inputs,” Procedia Computer Science, vol. 208, pp. 460–470, 2022, doi: https://doi.org/10.1016/j.procs.2022.10.064.

Downloads

Published

2025-05-01