Algorithms for Crime Type Comparative Analysis of Supervised Machine Learning Detection and Prediction
Keywords:
Crime Detection, Machine Learning, Random Forest, Offence Classification, Predictive PolicingAbstract
The institutional capacity to deal with crime data presents a significant challenge for law enforcement agencies. This study develops and evaluates a machine learning (ML)-based crime detection system based on four supervised classification algorithms—Decision Tree, Logistic Regression, Random Forest, and K-Nearest Neighbour (KNN)—applied to a publicly available crime dataset of 70,894 records obtained from Kaggle. Important spatiotemporal features like year, day of week, hour, latitude, and longitude were used as independent factors to anticipate the offence code as the dependent variable. R2 score, accuracy, and Mean Absolute Error (MAE) were employed.The results revealed that the Random Forest Classifier had the highest accuracy of 94% and the lowest MAE of 1,024, outperforming the Decision Tree (86%), Logistic Regression (71%), and KNN (57%). These findings lend credence to the notion that tasks requiring the classification of crime categories are best suited for ensemble-based techniques. The proposed system has a good potential of being used by Nigerian law enforcement agencies as a progressive, data-driven tool to support real-time crime detection and prevention.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Computer Science and Its Applications (JCSIA)

This work is licensed under a Creative Commons Attribution 4.0 International License.
This is an open-access journal which means that all content is freely available without charge to the user or his/her institution. Users are allowed to read, download, copy, distribute, print, search, or link to the full texts of the articles, or use them for any other lawful purpose, without asking prior permission from the publisher or the author.
The Journal own the copyright of the articles.
