Combination of Synthetic Minority Over-sampling Technique (SMOTE) and Random Forest in Improving the Accuracy of Illegal Drug User Classification
DOI:
https://doi.org/10.31004/joecy.v6i1.8399Keywords:
accuracy, classification, imbalanced data, SMOTE, illegal drugsAbstract
Illegal drug abuse remains a serious problem that requires analytical approaches with a high level of accuracy. In developing classification models, the imbalance in the amount of data between classes is often a major obstacle because it can cause the model to tend to classify data into the majority class. This study aims to improve accuracy and balance classification performance in identifying illegal drug users by applying a combination of the Synthetic Minority Over-sampling Technique (SMOTE) and the Random Forest algorithm. This study utilized the Drug Consumption dataset obtained from the UCI Machine Learning Repository with a total of 1,885 data points. The dataset was converted into a binary classification form, namely heroin users and non-users. Next, the data was divided into 75% training data and 25% testing data using a random sampling method. To address the problem of class imbalance, the SMOTE technique was applied to the training data to synthetically increase the number of data in the minority class. The balanced data was then processed using the Random Forest algorithm as a classification method. Model performance evaluation was carried out by comparing the classification results before and after the SMOTE application using accuracy, precision, recall, and F1-score metrics. The test results show that the application of SMOTE to Random Forest provides better performance improvements compared to the model without SMOTE. The accuracy value increased from 0.90 to 0.91, precision from 0.89 to 0.90, recall from 0.90 to 0.91, and F1-score from 0.89 to 0.90. This improvement reflects the model's more optimal ability to detect minority classes, thus minimizing bias towards the majority class. Based on these results, it can be concluded that the combination of SMOTE and Random Forest is effective in addressing imbalanced data issues and improving the overall classification performance of illegal drug users.
References
Basuni, N., & Siregar, A. M. (2023). Comparison of the Accuracy of Drug User Classification Models Using Machine Learning Methods. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 7(6). https://doi.org/10.29207/resti.v7i6.5401
Boutin, T., Bendaoud, I., Delmas, J., Borel, D., & Bordreuil, C. (2023). Machine Learning Approach for Weld Configuration Classification within the GTAW Process. CIRP Journal of Manufacturing Science and Technology, 47. https://doi.org/10.1016/j.cirpj.2023.09.006
Chaki, J., Ganesh, S. T., Cidham, S. K., & Theertan, S. A. (2022). Machine Learning and Artificial Intelligence Based Diabetes Mellitus Detection and Self-Management: A Systematic Review. Journal of King Saud University - Computer and Information Sciences, 34(6). https://doi.org/10.1016/j.jksuci.2020.06.013
Deepa, R., Gnanadesigan, R., Ranjith, D., Nithishkumar, K., Dinesh, A., & Moorthy, C. (2021). Performance Analysis of the Classification of Breast Cancer. Proceedings of the 3rd International Conference on Inventive Research in Computing Applications, ICIRCA 2021, 651–658. https://doi.org/10.1109/ICIRCA51532.2021.9544093
Delgado-Lobete, L., Montes-Montes, R., Vila-Paz, A., Cruz-Valiño, J. M., Gándara-Gafo, B., Talavera-Valverde, M. Á., & Santos-Del-riego, S. (2020). Individual and Environmental Factors Associated with Tobacco Smoking, Alcohol Abuse and Illegal Drug Consumption in University Students: A Mediating Analysis. International Journal of Environmental Research and Public Health, 17(9). https://doi.org/10.3390/ijerph17093019
E., B., D., B., & R, B. (2020). Supervised Machine Learning Based Gait Classification System for Early Detection and Stage Classification of Parkinson’s Disease. In Applied Soft Computing Journal. https://doi.org/10.1016/j.asoc.2020.106494
Heydarian, M., Doyle, T. E., & Samavi, R. (2022). MLCM: Multi-Label Confusion Matrix. IEEE Access, 10:19083–95. https://doi.org/10.1109/ACCESS.2022.3151048
Khan, A. A., Chaudhari, O., & Chandra, R. (2024). A Review of Ensemble Learning and Data Augmentation Models for Class Imbalanced Problems: Combination, Implementation and Evaluation. In Expert Systems with Applications. https://doi.org/10.1016/j.eswa.2023.122778
Nisa, S. K., Barata, M. A., & Yuwita, P. E. (2025). Optimization of Random Forest Algorithm with SMOTE Method to Improve the Accuracy of Early Diabetes Prediction. Scientific Journal of Informatics, 12(3), 387–396. https://doi.org/10.15294/sji.v12i3.22986
Qiao, Z., Chai, T., Zhang, Q., Zhou, X., & Chu, Z. (n.d.). Predicting Potential Drug Abusers Using Machine Learning Techniques.
Suryono, H., Kuswanto, H., & Iriawan, N. (2021). Rice Phenology Classification Based on Random Forest Algorithm for Data Imbalance Using Google Earth Engine. Procedia Computer Science, 668–676. https://doi.org/10.1016/j.procs.2021.12.201
Tyagi, P., Singh, J., & Gosain, A. (2024). No Title. Procedia Computer Science 235, 250–263. https://doi.org/10.1016/j.procs.2024.04.027
Widodo, A. O., Setiawan, B., & Indraswari, R. (2024). Machine Learning-Based Intrusion Detection on Multi-Class Imbalanced Dataset Using SMOTE. Procedia Computer Science 234, 578–583. https://doi.org/10.1016/j.procs.2024.03.042
Wu, M. Te. (2022). Confusion Matrix and Minimum Cross-Entropy Metrics Based Motion Recognition System in the Classroom. Scientific Reports, 12(1), 1–10. https://doi.org/10.1038/s41598-022-07137-z
Xu, J., Zhang, Y., & Miao, D. (2020). Three-Way Confusion Matrix for Classification: A Measure Driven View. In Information Sciences. https://doi.org/10.1016/j.ins.2019.06.064
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Anik Andriani, Anastasia Meyliana

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.







