Implementation of the K-Nearest Neighbor Algorithm for Environmental Security Level Classification Based on Crime Data

Authors

  • Muhammad Aidil Affan Universitas Medan Area
  • Alya Winanda Universitas Medan Area

DOI:

https://doi.org/10.55537/bigint.v4i1.1498

Keywords:

classification, crime data, environmental security, k-nearest neighbor

Abstract

This study aims to evaluate the effectiveness and performance of the K-Nearest Neighbor (KNN) algorithm in classifying regional security levels based on crime data. Secondary data are used with a quantitative research approach, applying KNN as the classification method and the Confusion Matrix as the evalution metric. The dataset consists of September and October data as training data and November data as testing data, with features including the number of crimes, theft cases, and violence cases. The result show that KNN achieves an accuracy of 96.15%, with a precision of 1.00 for the safe and vulnerable classes, a recall of 1.00 for the safe and alert classes, and 0.80 for the vulnerable class. This study demonstrates that KNN can effectively classify regional security levels and support decision-making based on official crime data.

Downloads

Download data is not yet available.

References

F. Rahmadayanti and R. Rahayu, “Penerapan metode data mining pada kasus kriminalitas Indonesia,” Jurnal Teknologi Informasi Mura, vol. 15, no. 1, pp. 52–61, 2023. https://doi.org/10.32767/jti.v15i1.2054

J. A. E. Jurnal et al., “Pengaruh urbanisasi, tingkat kemiskinan, dan ketimpangan pendapatan terhadap kriminalitas di Provinsi Jawa Timur,” Jurnal Aplikasi Ekonomi, vol. 6, no. 3, 2021. https://doi.org/10.29407/jae.v6i3.16307

B. Solikhin and A. Rifal, “Sistem informasi pengolahan data laporan kasus kriminal pada Subdit Renakta Ditreskrimum Polda Jawa Timur,” DIKE: Jurnal Ilmu Multidisiplin, vol. 2, no. 1, pp. 17–23, 2024. https://doi.org/10.69688/dike.v2i1.64

R. Puspita and A. Widodo, “Perbandingan metode KNN, decision tree, dan naïve Bayes terhadap analisis sentimen pengguna layanan BPJS,” Informatika, vol. 5, no. 4, pp. 646–654, 2021. https://doi.org/10.32493/informatika.v5i4.7622

I. Muslim, K. Karo, A. Khosuri, J. Steiven, I. Septory, and D. Pebrian, “Pengukuran jarak pada algoritma k-NN untuk klasifikasi kebakaran hutan dan lahan,” MIB: Media Informatika Budidarma, vol. 6, pp. 1174–1182, Apr. 2022. https://doi.org/10.30865/mib.v6i2.3967

H. U. Chikodili, P. O. Ogbobe, and M. C. Okoronkwo, “Analysis of crime pattern using data mining techniques,” International Journal of Advanced Computer Science and Applications, vol. 12, no. 12, 2021. https://doi.org/10.14569/ijacsa.2021.0121259

A. P. Setyan, “Prediksi kerawanan lokasi terhadap kasus pencurian kendaraan menggunakan algoritma jaringan syaraf tiruan,” Institut Teknologi Sepuluh Nopember, 2021. https://doi.org/10.30591/jpit.v6i3.2627

B. Kommey, D. Opoku, A. Asare-Appiah, G. O. Wiredu, and P. K. Baah, “An ad-hoc crime reporting information management system,” International Journal of Informatics, Information System and Computer Engineering (INJIISCOM), vol. 4, no. 2, pp. 136–159, 2023. https://doi.org/10.34010/injiiscom.v4i2.11436

[R. S. Nurhalizah and R. Ardianto, “Analisis supervised dan unsupervised learning pada machine learning: Systematic literature review,” JIKI, vol. 4, no. 1, pp. 61–72, 2024. https://doi.org/10.54082/jiki.168

R. P. R. Pambudi, “Prediction of criminal theft locations at the Binjai Police Station using historical data and the KNN algorithm,” Journal of Artificial Intelligence and Engineering Applications (JAIEA), vol. 5, no. 1, pp. 1499–1504, 2025. https://doi.org/10.59934/jaiea.v5i1.1658

A. P. Silalahi, H. G. Simanullang, and M. I. Hutapea, “Supervised learning metode k-nearest neighbor untuk prediksi diabetes pada wanita,” METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi, vol. 7, no. 1, pp. 144–149, 2023. https://doi.org/10.46880/jmika.vol7no1.pp144-149

P. M. S. Tarigan, J. T. Hardinata, H. Qurniawan, M. Safii, and R. Winanjaya, “Implementasi data mining menggunakan algoritma apriori dalam menentukan persediaan barang,” Jurnal Janitra Informatika dan Sistem Informasi, vol. 2, no. 1, pp. 9–19, 2022. https://doi.org/10.25008/janitra.v2i1.142

K. Lehmann et al., “Automated classification of crime narratives using machine learning and language models in official statistics,” Stats, vol. 8, no. 3, p. 68, 2025. https://doi.org/10.3390/stats8030068

Downloads

Published

2026-01-30

How to Cite

Affan, M. A., & Winanda, A. (2026). Implementation of the K-Nearest Neighbor Algorithm for Environmental Security Level Classification Based on Crime Data . Bigint Computing Journal, 4(1), 23–29. https://doi.org/10.55537/bigint.v4i1.1498

Issue

Section

Article