[Paper Review] Perfecting the Crime Machine
This paper proposes a novel hybrid machine learning workflow that combines unsupervised clustering with supervised classification to predict multi-class crime types in Philadelphia using spatiotemporal features. By using cluster distances as input features and optimizing with Random Forest, the model achieves a log loss of 2.3120, outperforming other models and enabling generalization across cities without grid-based spatial partitioning.
This study explores using different machine learning techniques and workflows to predict crime related statistics, specifically crime type in Philadelphia. We use crime location and time as main features, extract different features from the two features that our raw data has, and build models that would work with large number of class labels. We use different techniques to extract various features including combining unsupervised learning techniques and try to predict the crime type. Some of the models that we use are Support Vector Machines, Decision Trees, Random Forest, K-Nearest Neighbors. We report that the Random Forest as the best performing model to predict crime type with an error log loss of 2.3120.
Motivation & Objective
- To develop a scalable, city-agnostic crime prediction framework that avoids grid-based spatial partitioning.
- To improve multi-class crime type prediction by integrating unsupervised clustering with supervised learning.
- To identify the most predictive spatiotemporal features for crime classification.
- To systematically evaluate and compare multiple supervised models under high-class-label conditions (30 classes).
- To reduce dependency on city-specific preprocessing by using cluster centers as reference points.
Proposed method
- Clustering crime locations annually using unsupervised techniques to define spatial hotspots.
- Calculating Euclidean distances from each crime point to the nearest cluster center as a new feature.
- Extracting temporal features such as hour, minute, day of week, and month from timestamps.
- Applying feature engineering with rotated coordinates (Rot30X, Rot45X, Rot60X) to capture directional patterns.
- Training and tuning multiple supervised models: Random Forest, SVM, K-Nearest Neighbors, Decision Trees, Naive Bayes, Logistic Regression, and MLP.
- Optimizing model performance using log loss with probability smoothing and hyperparameter tuning.
Experimental results
Research questions
- RQ1Can unsupervised clustering of crime locations improve the performance of supervised crime type classification models?
- RQ2How does using distance-to-cluster-center as a feature compare to traditional grid-based spatial binning in crime prediction?
- RQ3Which combination of spatiotemporal features yields the highest predictive accuracy for multi-class crime type prediction?
- RQ4How do different supervised learning models perform under high-cardinality class labels (30 crime types)?
- RQ5To what extent can the proposed workflow be generalized across cities without city-specific preprocessing?
Key findings
- Random Forest achieved the lowest log loss of 2.3120, outperforming all other models, including SVM and K-Nearest Neighbors.
- The best-performing model achieved a log loss of 2.281062 with a smoothing parameter of 0.000170, indicating improved probability calibration.
- Feature importance analysis showed that Hour, Hour Zone, Y-coordinate, and Rot60X were the most influential features in predictions.
- The model achieved an accuracy of 0.218282, which, while low, reflects the challenge of multi-class crime prediction with 30 distinct labels.
- The highest misprediction rates occurred for crime types 20 (92,597 mispredictions) and 30 (49,930 mispredictions), with mean log loss values of 2.5779 and 2.1085, respectively.
- The workflow successfully reduced dependency on city-specific spatial grids, enabling generalization to other urban areas through cluster-based feature engineering.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.