Prediksi Risiko Penyalahgunaan Narkoba pada Remaja Menggunakan Algoritma Random Forest Berdasarkan Faktor Sosial, Demografis, dan Lingkungan
Abstract
Drug abuse among adolescents is a highly complex social and public health problem, influenced by multifactorial interactions between social, demographic, psychological, and environmental factors. Current prevention efforts are generally generalist and educational in nature, thus significantly limiting their ability to identify individuals with specific risk vulnerabilities early. Furthermore, existing predictive models often rely on costly and time-consuming clinical measurement instruments, making them difficult to implement on a large scale in schools. To address these challenges, this study aims to develop and evaluate a predictive model for the risk of drug abuse in adolescents using the Random Forest algorithm. This approach focuses on utilizing social, demographic, and environmental variables in a more practical and accessible manner. The dataset used comprises 10,000 respondents, with methodological steps including data preprocessing, feature engineering for classification of three risk classes (Low, Medium, High) using a quantile approach, and dividing the dataset into 80% training data and 20% testing data. The model was comprehensively evaluated using accuracy, precision, recall, F1-score, and confusion matrix metrics. The results showed that the Random Forest model achieved an accuracy rate of 33% in the multi-class classification scheme, and significantly increased to 51.95% in the binary classification scheme. Furthermore, feature importance analysis revealed that smoking prevalence, peer influence, and family background conditions were the predictors with the most dominant contribution in mapping adolescent vulnerability. The main contribution of this study is the design of a more granular risk categorization scheme and providing an initial foundation for the development of an adaptive, practical, and highly scalable machine learning-based early warning system to support preventive interventions in educational institutions.
References
I. Hidayat, T. Elektro, R. Deddy, R. Dako, and J. Ilham, “Volume 5 Nomor 2 Juli 2023 Analisis Data Eksploratif Capaian Indikator Kinerja Utama 3 Fakultas Teknik,” Jambura Journal of Electrical and Electronics Engineering, vol. 185.
A. M. Nawi et al., “Risk and protective factors of drug abuse among adolescents: a systematic review,” BMC Public Health, vol. 21, no. 1, Dec. 2021, doi: 10.1186/s12889-021-11906-2.
G. Casalicchio, C. Molnar, and B. Bischl, “Visualizing the feature importance for black box models,” in Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), Springer Verlag, 2019, pp. 655–670. doi: 10.1007/978-3-030-10925-7_40.
H. A. Salman, A. Kalakech, and A. Steiti, “Random Forest Algorithm Overview,” Dec. 15, 2024, Mesopotamian Academic Press. doi: 10.58496/BJML/2024/007.
R. Bardenet, M. Brendel, B. Kégl, M. Sebag, and S. Fr, “Collaborative hyperparameter tuning,” 2013.
“Global status report on alcohol and health and treatment of substance use disorders.”
R. Molowny-Horas, S. Harati-Asl, and L. Perez, “Understanding forest insect outbreak dynamics: a comparative analysis of machine learning techniques,” Geo-Spatial Information Science, 2025, doi: 10.1080/10095020.2025.2529992.
J. D. Hawkins, R. F. Catalano, and J. Y. Miller, “Risk and protective factors for alcohol and other drug problems in adolescence and early adulthood: Implications for substance abuse prevention.,” Psychol. Bull., vol. 112, no. 1, pp. 64–105, 1992, doi: 10.1037/0033-2909.112.1.64.
M. Whitesell, A. Bachand, J. Peel, and M. Brown, “Familial, Social, and Individual Factors Contributing to Risk for Adolescent Substance Use,” J. Addict., vol. 2013, pp. 1–9, 2013, doi: 10.1155/2013/579310.
F. Pedregosa FABIANPEDREGOSA et al., “Scikit-learn: Machine Learning in Python Gaël Varoquaux Bertrand Thirion Vincent Dubourg Alexandre Passos Pedregosa, Varoquaux, Gramfort ET AL. Matthieu Perrot,” 2011. [Online]. Available: http://scikit-learn.sourceforge.net.
B. Hariharan, R. Krithivasan, and A. Deborah, “Prediction of Secondary School Students’ Alcohol Addiction using Random Forest,” Int. J. Comput. Appl., vol. 149, no. 6, pp. 21–25, Sep. 2016, doi: 10.5120/ijca2016911423.
E. Scornet and G. Hooker, “Theory of Random Forests,” vol. 17, 2026, doi: 10.1146/annurev-statistics-112723.
I. Puspitorini, J. T. Kumalasari, and I. D. Sintawati, “Analisis Penerimaan Karyawan Konveksi Posisi Tukang Jahit Menggunakan Algoritma Decision Tree Pada PT. Nilosa Rama Buana,” Jurnal Minfo Polgan, vol. 14, no. 1, pp. 1406–1411, Jul. 2025, doi: 10.33395/jmp.v14i1.15060.
W. Amalia, W. Septiani Tanjung, J. Bin Sulong, and W. S. Tanjung, “Peer Support In Psychosocial Recovery: A Qualitative Study Of Napza (Substance Use Disorders) Rehabilitation At The Rumoh Geutanyoe Aceh Foundation,” Jurnal Al-Ijtimaiyyah, vol. 12, no. 1, pp. 138–152, doi: 10.22373/al-ijtimaiyyah.v12i1.
D. Dong and Z. Zhang, “A Comparative Eleven-Model Benchmark for Airline Route Profitability Prediction and Seasonal Cost Analysis,” 2026.
D. Akhiyar and H. Marfalino, “Pemanfaatan Machine Learning Dalam Analisis Data Untuk Mendukung Pengambilan Keputusan Cerdas Berbasis Data Modern.”
A. Sigurðardóttir, N. Barrenechea, and A. Benítez, “Random Forest Prediction of Adolescent Risk-Taking Behaviors Based on Sensation Seeking, Online Disinhibition, Emotional Impulsivity, Peer Deviance, and Executive Dysfunction,” Journal of Adolescent and Youth Psychological Studies, vol. 7, no. 5, pp. 1–14, 2026, doi: 10.61838/kman.jayps.5479.
“The Random Forest Algorithm and Logistic Regression for Classification with Application,” Iraqi Statisticians Journal, no. 2, pp. 99–104, May 2025, doi: 10.62933/f3g3c233.
K. Riva, L. Allen-Taylor, W. D. Schupmann, S. Mphele, N. Moshashane, and E. D. Lowenthal, “Prevalence and predictors of alcohol and drug use among secondary school students in Botswana: A cross-sectional study,” BMC Public Health, vol. 18, no. 1, Dec. 2018, doi: 10.1186/s12889-018-6263-2.
A. M. Nawi et al., “Risk and protective factors of drug abuse among adolescents: a systematic review,” BMC Public Health, vol. 21, no. 1, Dec. 2021, doi: 10.1186/s12889-021-11906-2.
I. N1, S. Jayakumar2, S. Jayakumar2, M. Magdalene, and J. F3, “Dynamic RFM Model Selection for Customer Segmentation Using Meta-Learning,” International Journal of Computer Information Systems and Industrial Management Applications, vol. 18, no. 5s, pp. 1080–1093, 2026, doi: 10.70917/ijcisim-2026-2854.
S. Kim et al., “Machine Learning–Based Prediction of Substance Use in Adolescents in Three Independent Worldwide Cohorts: Algorithm Development and Validation Study,” J. Med. Internet Res., vol. 27, 2025, doi: 10.2196/62805.
Y. Gan et al., “Application of machine learning in predicting adolescent Internet behavioral addiction,” Front. Psychiatry, vol. 15, 2024, doi: 10.3389/fpsyt.2024.1521051.
Y. A. Choi et al., “Deep learning-based stroke disease prediction system using real-time bio signals,” Sensors, vol. 21, no. 13, Jul. 2021, doi: 10.3390/s21134269.
N. Melnykova, Y. Patereha, S. Skopivskyi, M. Farion, S. Fedushko, and K. Drohomyretska, “Machine learning for stroke prediction using imbalanced data,” Sci. Rep., vol. 15, no. 1, Dec. 2025, doi: 10.1038/s41598-025-01855-w.
S. L. J M and S. P, “Unveiling the potential of machine learning approaches in predicting the emergence of stroke at its onset: a predicting framework,” Dec. 01, 2024, Nature Research. doi: 10.1038/s41598-024-70354-1.
N. G. Chigozie and E. S. Chinecherem, “Stroke Awareness Among Working Class Women in Bauchi State: Social Media Influences and Practice Considerations for Social Work,” Apr. 23, 2026. doi: 10.21203/rs.3.rs-9115451/v1.
S. Dev, H. Wang, C. S. Nwosu, N. Jain, B. Veeravalli, and D. John, “A predictive analytics approach for stroke prediction using machine learning and neural networks,” Healthcare Analytics, vol. 2, Nov. 2022, doi: 10.1016/j.health.2022.100032.
“Haris Metode Naïve Bayes Untuk Memprediksi Penyakit Stroke.”
G. Sailasya and G. L. Aruna Kumari, “Analyzing the Performance of Stroke Prediction using ML Classification Algorithms.” [Online]. Available: www.ijacsa.thesai.org
V. L. Feigin et al., “World Stroke Organization: Global Stroke Fact Sheet 2025,” Feb. 01, 2025, SAGE Publications Inc. doi: 10.1177/17474930241308142.
A. F. Riany and G. Testiana, “Penerapan Data Mining untuk Klasifikasi Penyakit Stroke Menggunakan Algoritma Naïve Bayes,” Jurnal SAINTEKOM, vol. 13, no. 1, pp. 42–54, Mar. 2023, doi: 10.33020/saintekom.v13i1.352.
M. Nurkholifah, A. NofiarAm, F. Kurnia Oktorina, S. Amik Riau, and P. Kampar, “Analisa Penyakit Jantung Menggunakan Algoritma Naïve Bayes,” 2023. [Online]. Available: https://www.kaggle.com/datasets/zgeakyldz/heart-desease-data
Q. A’yuniyah et al., “Implementasi Algoritma Naïve Bayes Classifier (NBC) untuk Klasifikasi Penyakit Ginjal Kronik,” Jurnal Sistem Komputer dan Informatika (JSON), vol. 4, no. 1, p. 72, Sep. 2022, doi: 10.30865/json.v4i1.4781.
F. Novaldy and A. Herliana, “Penerapan Pso Pada Naïve Bayes Untuk Prediksi Harapan Hidup Pasien Gagal Jantung,” Jurnal RESPONSIF, vol. 3, no. 1, pp. 37–43, 2021, [Online]. Available: http://ejurnal.ars.ac.id/index.php/jti
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Prediksi Risiko Penyalahgunaan Narkoba pada Remaja Menggunakan Algoritma Random Forest Berdasarkan Faktor Sosial, Demografis, dan Lingkungan
Pages: 108 - 117
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).