Crime has become one of the most pressing concerns in modern societies, with urbanization and population growth contributing to its rising complexity. Traditional crime analysis methods are largely reactive and fail to capture the hidden trends required for proactive policing. To address this challenge, this research introduces a machine learning-based crime prediction system that utilizes Decision Tree and Bagging Classifier algorithms. A dataset comprising 505,063 records from Portland, Oregon (2015–2023) was preprocessed and analyzed. The models achieved strong performance, recording 98% accuracy on training data and 95% accuracy on testing data. The system classifies crimes into 20 distinct categories and provides predictive insights that support law enforcement in hotspot identification and preventive action. By employing ensemble-based methods, the framework demonstrates both robustness and interpretability, thereby contributing to the development of intelligent data-driven solutions for public safety. KEYWORDS Crime Prediction, Machine Learning, Decision Tree, Bagging Classifier, Ensemble Learning, Predictive Policing, Flask Application
Bharadwaj et al. (Sun,) studied this question.