ML engineering project
Crime Prediction
Crime prediction is a critical task for law enforcement agencies and urban planners to allocate resources effectively and prevent criminal activities. Chicago, being one of the largest cities in the United States, faces various challenges related to crime, making it an ideal candidate for such predictive modeling efforts. **Research Foundation:** This project implementation is based on the research paper ["Crime Prediction Using Machine Learning"](https://arxiv.org/pdf/2303.16310.pdf), which explores various ML techniques for anticipating criminal activity patterns in urban environments.  **Data Sources:** The data used in this project consists of historical crime records obtained from the [Chicago Police Department](https://data.cityofchicago.org/Public-Safety/Crimes-2001-to-Present/ijzp-q8t2/data), containing over 20 years of crime incidents from 2001 to present.   **Methodology:** • **Data Collection** - Gather historical crime data from the Chicago Police Department and relevant socio-economic and environmental datasets • **Data Preprocessing** - Clean the data, handle missing values, and engineer features • **Feature Selection** - Identify significant features that contribute to crime prediction, including time of day, day of week, and location characteristics • **Model Development** - Train various machine learning models including Support Vector Machine and Random Forest Regression • **Model Evaluation** - Evaluate model performance using metrics like accuracy, precision, recall, and F1-score **Key Model Features:** The predictive models leverage temporal and spatial features: • **Temporal Features**: Time of day, day of week, seasonal patterns • **Spatial Features**: Geographic coordinates, neighborhood characteristics • **Historical Patterns**: Crime type frequencies, trend analysis **Prediction Results:**    **Deployment:** The best-performing model is deployed as a web application with Flask backend, allowing users to input various parameters and receive real-time crime predictions for different locations in Chicago. The application features interactive Bing Maps visualization for geographical crime analysis. **Tech Stack:** Built with **Python**, **Flask**, **scikit-learn**, **Pandas**, **NumPy**, **Jupyter**, and **Bing Maps API**. The system processes large-scale crime datasets and provides interactive visualizations for predictive analytics.

Problem
Explore whether historical temporal and spatial patterns can support planning around Chicago crime data.
My role
Built the data, modeling, evaluation, and web-visualization pipeline from the public dataset and referenced research methodology.
Approach
Clean public Chicago records, engineer time and location features, compare classical ML models, and display predictions in a Flask and map interface.
Outcome
Delivered an interactive predictive-analytics study; no operational accuracy or public-safety impact metric is claimed.
Implementation
- Prepared temporal, spatial, and historical-frequency features.
- Compared Support Vector Machine and Random Forest approaches.
- Exposed exploratory outputs through Flask and Bing Maps.
Evaluation
- Compared predicted and observed locations and crime types in project visualizations.
- The project record lists standard classification metrics but does not provide a headline result.
Results
- Produced an end-to-end study over the Chicago public crime dataset.
- The work is framed as exploratory analytics, not a deployment recommendation.
Constraints
- The source spans more than two decades and includes missing and shifting fields.
- Historical police data reflects collection and reporting biases.
- Spatial predictions are sensitive and require careful interpretation.
Tradeoffs
- Historical pattern modeling may reproduce reporting and enforcement bias.
- Map-level summaries are legible but can hide uncertainty and local context.
Next improvements
- Add temporal holdouts, calibration, uncertainty, and explicit fairness analysis.
- Reframe outputs around transparent planning signals rather than individual prediction.