Klasifikasi Daerah Rawan Narkotika menggunakan Algoritma K-Nearest Neighbors (Studi Kasus: Kabupaten Klaten) - Sari, Prima Wulan; Akbar, Mutaqin (Sekolah Tinggi Ilmu Komputer PGRI Banyuwangi, 2025)
The impact of drug abuse can be devastating, including individual and community health. Various efforts have been made and coordinated with government agencies, law enforcement, communities and others. One of them is by classifying drug distribution areas to suppress the decline in drug abuse cases. This study tested 26 sub-districts in Klaten district, Central Java in 2022. The classification process is done by implementing the K-Nearest Neighbors method integrated with Google Colab and Python programming. The KNN method was chosen because it can assign categories or labels to new data based on the majority of its nearest neighbors in a predefined attribute space. The conclusion obtained is that the system can classify as many as 7 sub-districts with the status of Very Prone areas, 15 sub-districts with the status of Prone, and 7 sub-districts with the status of Not Prone Tests conducted with the KNN method with confusion matrix resulted in an accuracy of 100%, %, Precision 100%, recall 100% and f1-Score of 100% and an average accuracy of 70.5%. The high accuracy value shows that this research has successfully applied the KNN method in classifying drug-prone areas in Klaten district. Relevant agencies such as Klaten District Police can adjust the program dynamically to monitor areas that have been classified as drug-prone and conduct faster follow-up.