Algorithms for Crime Type Comparative Analysis of Supervised Machine Learning Detection and Prediction

Authors

  • Abass Olalere A. Dept. of Computer Sciences, Olabisi Onabanjo University, Ago-Iwoye, Nigeria.
  • Alamu Babatunde M. Dept. of Computer Sciences, Tai Solarin Federal University of Education, Ijagun, Nigeria.
  • Ogunsanwo Gbenga O. Dept. of Computer Sciences, Tai Solarin Federal University of Education, Ijagun, Nigeria.
  • Alaba Olumuyiwa B., Dept. of Computer Sciences, Tai Solarin Federal University of Education, Ijagun, Nigeria.
  • Omude Paul O. Dept. of Computer Sciences, Tai Solarin Federal University of Education, Ijagun, Nigeria.
  • Olukoya Gabriel O. Dept. of Computer Sciences, Tai Solarin Federal University of Education, Ijagun, Nigeria.

Keywords:

Crime Detection, Machine Learning, Random Forest, Offence Classification, Predictive Policing

Abstract

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

2026-06-30