Predictive Model for Robberies in Mexico City

Machine Learning · Predictive Modeling

This project focused on creating models to predict the number of pedestrian robberies in different areas of Mexico City, using historical crime reports and geographical factors. The goal was to identify patterns and high-risk areas to support informed decision-making.

Objective

To develop a system capable of anticipating robberies in Mexico City by neighborhood and by week, based on historical data, and to provide useful visualizations for authorities and citizens.

Tools and Technologies

  • Python (pandas, scikit-learn, matplotlib, seaborn)
  • Models: Linear Regression, Decision Trees, Random Forest
  • Hyperparameter tuning with GridSearchCV
  • Geospatial visualization with GeoPandas and Folium

Results

We achieved a model with good predictive capacity (R² ≈ 0.78) on the validation set. Visualizations helped identify critical areas such as Cuauhtémoc and Benito Juárez, as well as the time ranges with higher risk.

Key Learnings

This project strengthened my skills in modeling, spatial data analysis, and interactive visualization tools. It also highlighted the importance of data quality in predictive analysis.

Resources