Jurnal Komtika (Komputasi dan Informatika)

Articles

Prediksi Risiko Depresi Pada Remaja Berdasarkan Frekuensi Penggunaan Media Sosial Yang Tinggi Menggunakan SMOTE dan Algoritma Naive Bayes

Dian Margi Santoso , Ulfah Kusnia , Arif Faizin

Abstract

The increased use of social media among adolescents has been identified as a suspected contributing factor to the emergence of mental health issues, including depression. However, identifying depression risk in adolescents remains challenging, primarily due to data imbalanced, which can affect the performance of classification models. This study aims to build a classification model for adolescent depression risk based on social media usage frequency using the naive bayes algorithm, and compare classification performance before and after applying SMOTE based on accuracy, precision, recall, and F1-Score. This study utilized the Teen Mental Health Dataset obtained from Kaggle. The research stages include data pre-processing, feature and target separation, splitting the data into training and testing sets with an 80:20 ratio. Applying the SMOTE method to the training data, and classification using the naïve bayes algorithm. Model evaluation was conducted using a confusion matrix. The test result showed that the model without SMOTE achieved an accuracy of 99%, precision of 100%, recall of 50%, and an F1-Score 67%. Meanwhile, the model with the application of SMOTE achieved an accuracy 97%, precision of 50%, recall of 33%, and an F1-Score of 40%. Based on the research results, the naïve bayes algorithm is capable of providing excellent classification performance in prediction the risk of depression in adolescents. The application of SMOTE successfully balanced the class distribution in the training data, but did not provide a significant performance improvement compared to the model without SMOTE. Therefore, the naïve bayes model without SMOTE is the best approach for the dataset used in this study.

Keywords

Depresi Remaja; Media sosial; Naive Bayes; SMOTE; Machine Learning

References

  1. [1] S. M. Saleem and S. S. Jan, “A Cross-sectional Study of Mental Health Effects of Excessive Screen Time and Social Media Use among Indian Adolescents and Young Adults,” J. Nat. Sci. Med., vol. 3, p. 299, Jun. 2024, doi: 10.4103/jnsm.jnsm_37_24.
  2. [2] S. Damodar et al., “Trending: A Systematic Review of Social Media Use’s Influence on Adolescent Anxiety and Depression,” Adolesc. Psychiatry (Hilversum)., vol. 12, no. 1, pp. 11–22, Mar. 2022, doi: 10.2174/2210676612666220225122720.
  3. [3] N. L. P. A. S. Putri, N. M. S. Iswari, and I. G. P. K. Juliharta, “Prediksi Kesehatan Mental Pengguna Berdasarkan Konsumsi Konten Pada Media Sosial Menggunakan Metode Random Forest,” RIGGS J. Artif. Intell. Digit. Bus., vol. 4, no. 4, pp. 12007–12022, Jan. 2026, doi: 10.31004/riggs.v4i4.5440.
  4. [4] D. Nickson, C. Meyer, L. Walasek, and C. Toro, Prediction and diagnosis of depression using machine learning with electronic health records data: a systematic review, vol. 23, no. 1. BioMed Central, 2023. doi: 10.1186/s12911-023-02341-x.
  5. [5] J. O. Leandro and M. I. Fianty, “Evaluation of Sentiment Analysis Methods for Social Media Applications: A Comparison of Support Vector Machines and Naïve Bayes,” JOIV Int. J. Informatics Vis., vol. 9, no. 2, p. 796, Mar. 2025, doi: 10.62527/joiv.9.2.2905.
  6. [6] A. Wibowo, A. F. N. Masruriyah, and S. Rahmawati, “Refining Diabetes Diagnosis Models: The Impact of SMOTE on SVM, Logistic Regression, and Naïve Bayes,” J. Electron. Electromed. Eng. Med. Informatics, vol. 7, no. 1, pp. 197–207, Jan. 2025, doi: 10.35882/jeeemi.v7i1.596.
  7. [7] J. J. Wibowo, D. A. Kristiyanti, and J. Wiratama, “Enhancing Heart Disease Classification: A Comparative Analysis of SMOTE and Naïve Bayes on Imbalanced Data,” JOIV Int. J. Informatics Vis., vol. 9, no. 5, p. 2072, Sep. 2025, doi: 10.62527/joiv.9.5.3248.
  8. [8] Dedi Trisnawarman and Reza Mahendra, “Improving Vehicle Payment Method Classification Using XGBoost with SMOTE and SHAP Interpretation,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 10, no. 1, pp. 11–19, Feb. 2026, doi: 10.29207/resti.v10i1.6935.
  9. [9] U. Budiyanto, T. Fatimah, B. A. Pratama, and P. Korespondensi, “Prediksi Tingkat Depresi (Kesehatan Mental) Menggunakan Phq-9, Naïve Bayes, Random Forest Dan Support Vector Machine,” J. Teknol. Inf. dan Ilmu Komput., vol. 13, no. 1, pp. 2355–7699, 2026, doi: 10.25126/jtiik.2026131.
  10. [10] 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 Indones. J. Mach. Learn. Comput. Sci., vol. 3, no. 2, pp. 108–114, Sep. 2023, doi: 10.57152/malcom.v3i2.780.
  11. [11] I. S. Romadon and C. Kirana, “ANALISIS KOMPARATIF NAIVE BAYES, RANDOM FOREST: INDIKATOR DEPRESI TEKS PADA TWITTER,” J. Inf. Syst. Manag., vol. 8, no. 1, pp. 70–74, Jul. 2026, doi: 10.24076/joism.2026v8i1.2547.
  12. [12] M. Sivakumar, S. Parthasarathy, and T. Padmapriya, “Trade-off between training and testing ratio in machine learning for medical image processing,” PeerJ Comput. Sci., vol. 10, p. e2245, Sep. 2024, doi: 10.7717/peerj-cs.2245.
  13. [13] A. N. Cahyani, J. Zeniarja, S. Winarno, R. T. E. Putri, and A. A. Maulani, “Heart Disease Classification Using Deep Neural Network with SMOTE Technique for Balancing Data,” Adv. Sustain. Sci. Eng. Technol., vol. 6, no. 1, p. 0240108, Dec. 2023, doi: 10.26877/asset.v6i1.17521.
  14. [14] S. O. Ngesthi and L. A. Wulandhari, “Cassava Diseases Classification using EfficientNet Model with Imbalance Data Handling,” J. Online Inform., vol. 9, no. 2, pp. 148–158, Aug. 2024, doi: 10.15575/join.v9i2.1300.
  15. [15] L. P. Wanti, N. W. Adi Prasetya, I. Awaludin, M. B. Aditya Saputra, S. N. Furi, and D. M. Dwi Kumara, “Application of data mining for diagnosis of ENT diseases using the Naïve Bayes method with genetic algorithm feature selection,” Indones. J. Electr. Eng. Comput. Sci., vol. 37, no. 1, p. 398, Jan. 2025, doi: 10.11591/ijeecs.v37.i1.pp398-405.
  16. [16] M. K. Zuhanda, Lisya Permata, Hartono, Erianto Ongko, and Desniarti, “Impact of Adaptive Synthetic on Naïve Bayes Accuracy in Imbalanced Anemia Detection Datasets,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 9, no. 1, pp. 85–93, Jan. 2025, doi: 10.29207/resti.v9i1.6031.