Skip to content

Latest commit

Β 

History

History
94 lines (61 loc) Β· 2.63 KB

File metadata and controls

94 lines (61 loc) Β· 2.63 KB

πŸ” Crime Forecasting: Spatiotemporal Prediction Using Machine Learning

This repository contains the complete implementation of our project:

πŸ“„ "An Integrated Approach to Crime Prediction Using Time Series and Spatial Analysis"


πŸ“Œ Overview

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.


πŸ“ˆ Methodology

πŸ”§ Preprocessing

  • Handle missing values, drop duplicates
  • Isolation Forest for outlier detection (1% contamination)
  • DBSCAN for spatial clustering

🧠 Feature Engineering

  • Temporal: lag features, rolling stats, STL decomposition
  • Spatial: encode grid coordinates (H3 or manual grid)

πŸ“‰ Modeling Techniques

  • πŸ“Š 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)

πŸ“ Evaluation Metrics

  • RΒ², MAE, MAPE, RMSE, Accuracy Β±1 count

πŸ“Š Visualization

  • Time series plots, STL components
  • Spatial probability heatmaps for crime risk

πŸš€ Getting Started

βœ… Prerequisites

  • Python 3.8+
  • Jupyter Notebook or Jupyter Lab

πŸ“Œ Key Results

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%

🌍 Visual Insights

  • πŸ”₯ High-risk areas of crime forecasted using our spatial model
  • πŸ“ˆ Comparison of actual vs predicted crime count using Ensemble model

🀝 Contributors

  • 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

πŸ“¬ Contact

πŸ“§ shoaib@msds.christuniversity.in
πŸ“§ chittesh.k@msds.christuniversity.in


πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.