This repository contains the complete implementation of our project:
π "An Integrated Approach to Crime Prediction Using Time Series and Spatial Analysis"
Urban crime is both spatial and temporal in nature. Our project introduces a hybrid forecasting framework that integrates:
- π Time Series Forecasting using Prophet, STL, and LightGBM
- πΊοΈ Spatial Prediction using Random Forest with GIS coordinates
- π Stacked Ensemble Modeling to improve forecast accuracy
- π Visualization Dashboards: Heatmaps, forecasts, EDA
Objective: Predict daily crime counts and locate high-risk grid areas in Chicago using public crime data.
- Handle missing values, drop duplicates
- Isolation Forest for outlier detection (1% contamination)
- DBSCAN for spatial clustering
- Temporal: lag features, rolling stats, STL decomposition
- Spatial: encode grid coordinates (H3 or manual grid)
- π Prophet: Long-term and seasonal crime trends
- π² LightGBM: Nonlinear pattern learning
- π Random Forest: Grid-level spatial classification
- π Stacked Ensemble: Combines base predictions (GBR as meta-learner)
- RΒ², MAE, MAPE, RMSE, Accuracy Β±1 count
- Time series plots, STL components
- Spatial probability heatmaps for crime risk
- Python 3.8+
- Jupyter Notebook or Jupyter Lab
| Model | RΒ² Score | MAE | MAPE |
|---|---|---|---|
| Prophet | 0.333 | 35.4 | ~ |
| LightGBM | 0.322 | 35.44 | ~ |
| Random Forest | 0.356 | 0.16 | β |
| Ensemble | 0.966 | 5.86 | 1.36% |
- π₯ High-risk areas of crime forecasted using our spatial model
- π Comparison of actual vs predicted crime count using Ensemble model
- Shoaib β Time series forecasting, ensemble design
- Chittesh K β Geospatial modeling, Random Forest classifier
- Deepa S β Research guidance, model evaluation
- Rashmi Siddalingappa β Review and editorial
- Vinay M β Project supervision
π§ shoaib@msds.christuniversity.in
π§ chittesh.k@msds.christuniversity.in
This project is licensed under the MIT License. See LICENSE for details.