michaelml.dev / Michael_Portfolio.ipynb
This project aims to predict crime occurrences in Chicago using machine learning techniques. By analyzing historical crime data along with various socio-economic and environmental factors, we aim to build a predictive model that can anticipate the likelihood of different types of crimes in different areas of Chicago.
[ ]
code · Crime Prediction
project = load_project("crime-prediction")
project.summary()Output

Crime Prediction
This project aims to predict crime occurrences in Chicago using machine learning techniques. By analyzing historical crime data along with various socio-economic and environmental factors, we aim to build a predictive model that can anticipate the likelihood of different types of crimes in different areas of Chicago.
PythonMachine LearningFlaskscikit-learnRandom ForestSVMPandasNumPyBing Maps APIData AnalysisPredictive Modeling
[ ]
code · Problem definition
project = load_project("crime-prediction")
project.problem()Output
ProblemExplore whether historical temporal and spatial patterns can support planning around Chicago crime data.
ApproachClean public Chicago records, engineer time and location features, compare classical ML models, and display predictions in a Flask and map interface.
OutcomeDelivered an interactive predictive-analytics study; no operational accuracy or public-safety impact metric is claimed.
[ ]
code · Constraints
project = load_project("crime-prediction")
project.constraints()Output
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.
[ ]
code · Role and implementation
project = load_project("crime-prediction")
project.implementation()Output
Role and implementation
My role: Built the data, modeling, evaluation, and web-visualization pipeline from the public dataset and referenced research methodology.
- Prepared temporal, spatial, and historical-frequency features.
- Compared Support Vector Machine and Random Forest approaches.
- Exposed exploratory outputs through Flask and Bing Maps.
[ ]
code · Architecture
project = load_project("crime-prediction")
project.show_architecture()Output
Data CollectionDownload 20+ years of historical crime data from Chicago Police Department portal (7M+ records)
Data PreprocessingClean dataset, handle missing values, normalize features, and remove outliers for robust analysis
Feature EngineeringExtract temporal patterns (time of day, day of week) and spatial characteristics (coordinates, neighborhoods)
Model TrainingTrain Support Vector Machine and Random Forest models with hyperparameter tuning and cross-validation
Performance EvaluationEvaluate models using accuracy, precision, recall, and F1-score metrics to select best performer
Web DeploymentDeploy Flask application with Bing Maps integration for interactive crime prediction visualization
[ ]
code · Demo and media
project = load_project("crime-prediction")
project.media()Output

[ ]
code · Evaluation
project = load_project("crime-prediction")
project.evaluation()Output
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.
[ ]
code · Results
project = load_project("crime-prediction")
project.results()Output
Results
- Produced an end-to-end study over the Chicago public crime dataset.
- The work is framed as exploratory analytics, not a deployment recommendation.
[ ]
code · Tradeoffs and failures
project = load_project("crime-prediction")
project.tradeoffs()Output
Tradeoffs
- Historical pattern modeling may reproduce reporting and enforcement bias.
- Map-level summaries are legible but can hide uncertainty and local context.
[ ]
code · What I would improve
project = load_project("crime-prediction")
project.improvements()Output
Improvements
- Add temporal holdouts, calibration, uncertainty, and explicit fairness analysis.
- Reframe outputs around transparent planning signals rather than individual prediction.
[ ]