Putri, Anya Regina
Unknown Affiliation

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Comparison of the K-Nearest Neighbor and Random Forest Methods in Classifying the Best Selling Medicines at Khan Pharmacy Matang Glumpang Dua Putri, Anya Regina; Rozzi Kesuma Dinata; Maryana
Journal of Advanced Computer Knowledge and Algorithms Vol. 3 No. 2 (2026): Journal of Advanced Computer Knowledge and Algorithms - April 2026 (In Press)
Publisher : Department of Informatics, Universitas Malikussaleh

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.29103/jacka.v3i2.25183

Abstract

Khan Matang Glumpang Dua Pharmacy faces difficulties in analyzing drug sales patterns that affect inventory efficiency and customer satisfaction. The need to anticipate demand and reduce the risk of stockouts or excess stock requires an effective classification system for best-selling drugs. This study aims to test the K-Nearest Neighbor (KNN) and Random Forest methods to perform and find the best classification model. The data used in this study consisted of 382 data points. This study compared two classification models on pharmacy sales data. The K-Nearest Neighbor (KNN) model was tested using the parameter k=3, while the Random Forest model was tested with 100 trees and a max depth of 5. The results showed that the KNN and Random Forest (RF) algorithms. The Random Forest (RF) model outperformed KNN on all metrics: RF achieved an Accuracy and F1-Score of 94.81%, while KNN recorded an Accuracy of 93.51% and an F1-Score of 93.44%.