Bigint Computing Journal
Vol 4 No 1 (2026)

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

Muhammad Aidil Affan (Universitas Medan Area)
Alya Winanda (Universitas Medan Area)



Article Info

Publish Date
30 Jan 2026

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.

Copyrights © 2026






Journal Info

Abbrev

bigint

Publisher

Subject

Computer Science & IT

Description

Bigint Computing Journal is a journal that discusses science in the field of computing, namely: Computer Engineering (CE): Computer Engineering/Computer Systems/Information Engineering, Computer Science (CS): Computer Science/Informatics, Software Engineering (SE): Engineering Software, Information ...