Artificial Intelligence is well known for its content generation capabilities, but it can also be used for other purposes that have a positive social impact, such as predicting high-risk crime areas.
Thanks to the study of historical data and socio-economic, climatic or temporal variables, it is possible to predict where there is a higher risk of crime, allowing the optimisation of police resources and understanding the dynamics of crime, in this case in the city of Montevideo.
Carried out by Marcelo Miraballes | Daniel Vega | Diego Macias | Marco Antonio Peña
Qualification Master in IA & Data Science
Technologies Artificial Intelligence | Machine Learning | Data Analysis and Visualisation | Optimisation of Models | Development Environments
What is the motivation?
The rise of data collection has increased interest in applying techniques of Machine Learning in the Service of Public Safety, analysing them to predict high-crime risk areas and facilitating efficient resource allocation.
Program aims
- Predict high-risk crime areas using historical data and socio-economic, climatic and temporal variables.
- Optimising patrol resources through a data-driven approach.
- Analysing crime patterns to better understand the dynamics of crime in Montevideo.

Development
The project has involved the following phases:
- Collection of historical data and different climatic and socio-economic variables.
- Data cleaning and preparation, adjusting variables and dealing with missing values.
- Exploratory data analysis, identifying different crime patterns, analysing correlations and detecting outliers.
- Feature engineering, analysing the importance of different variables, encoding categorical variables and creating new variables.
- Predictive modelling, training the different supervised models, optimising the hyperparameters and carrying out an evaluation with performance metrics.
- Evaluation of the model, studying the ROC curve and overfitting, optimising the classification threshold and evaluating the metrics.

Results
The results obtained include:
- Robust model with an AUC above 0.75 and an F1-Score optimised by threshold adjustment techniques.
- Optimised model performance with the use of Optuna and efficient hyperparameter tuning.
Crime analysis in critical areas for public safety, supported by AI and ML, facilitates the optimisation of police resources, allocating them where they are most needed, as well as serving as support in urban planning and the prevention of all types of crime.
