Source-linked AI summary

Crime prediction through urban metrics and statistical learning

Luiz G A Alves, Haroldo V Ribeiro, Francisco A Rodrigues

arXiv:1712.03834v2physics.soc-phstat.APstat.ML

TL;DR

Crime studies often rely on correlations between urban metrics and crime, although non-Gaussian distributions and multicollinearity complicate conclusions about indicator influence. The paper uses a random forest regressor trained on Brazilian-city indicators to predict homicides and rank urban features. It reports high predictive accuracy and stable importance rankings, with unemployment and illiteracy identified as especially important, while noting that the analysis cannot determine whether variables have positive or negative effects on homicide counts.

  • Problem

    Linear-model conclusions about crime indicators can be controversial when crime data violate distributional and multicollinearity assumptions.

  • Method

    The study trains a random forest on urban indicators from Brazilian cities to predict homicides and quantify feature importance.

  • Results

    Together, unemployment, illiteracy, and male population explain 78% of the variance in the dataset, with unemployment the most important feature among 12 indicators.

  • Takeaways & Limitations

    The stable importance ranking supports using this approach for crime modeling and as a guide for policymakers.

  • Takeaways & Limitations

    The analysis cannot identify whether the variables have positive or negative effects on homicide counts.

Abstract

from arXiv · show

Understanding the causes of crime is a longstanding issue in researcher's agenda. While it is a hard task to extract causality from data, several linear models have been proposed to predict crime through the existing correlations between crime and urban metrics. However, because of non-Gaussian distributions and multicollinearity in urban indicators, it is common to find controversial conclusions about the influence of some urban indicators on crime. Machine learning ensemble-based algorithms can handle well such problems. Here, we use a random forest regressor to predict crime and quantify the influence of urban indicators on homicides. Our approach can have up to 97% of accuracy on crime prediction, and the importance of urban indicators is ranked and clustered in groups of equal influence, which are robust under slightly changes in the data sample analyzed. Our results determine the rank of importance of urban indicators to predict crime, unveiling that unemployment and illiteracy are the most important variables for describing homicides in Brazilian cities. We further believe that our approach helps in producing more robust conclusions regarding the effects of urban indicators on crime, having potential applications for guiding public policies for crime control.

Highlights

The paper applies predictive analysis to crime data and examines correlations between crime and urban metrics.

  • Predictive analysis is applied to crime data.
  • The analysis considers correlations between crime and urban metrics.
  • The manuscript was submitted to Physica. A on April 10, 2018.

1. Introduction

The paper examines relationships between crime and urban metrics using statistical learning because conventional linear-model assumptions often fail for crime data. Using a random forest trained on Brazilian-city indicators, it predicts homicides and identifies stable feature importance, with unemployment and illiteracy among the most important indicators.

  • 1. Introduction: Crime research links criminal activity with psychological, environmental, spatial, social, and economic factors.
  • 1. Introduction: Conventional linear regressions assume error-free predictors, linearity, constant variance, normal residuals, and weak multicollinearity.
  • 1. Introduction: Crime data often violate these assumptions through heteroscedasticity, heavy-tailed distributions, and multicollinearity, producing controversial or misleading conclusions about variable importance.
  • 1. Introduction: Urban metrics and crime indicators exhibit nonlinear scaling with city population, including sublinear, linear, and superlinear relationships.
  • 1. Introduction: Machine-learning regression methods can handle complex datasets, model nonlinear relationships, and require fewer distributional assumptions than conventional approaches.
  • 1. Introduction: The study uses a random forest with urban indicators from Brazilian cities to predict homicides and quantify indicator importance.
  • 1. Introduction: Up to 97% of homicide variance is explained, while important features remain stable under slight dataset changes and can inform crime modeling and policymakers.

2. Methods and Results

The study models homicide counts in Brazilian cities with a random forest because urban indicators violate key linear-regression assumptions. It reports high predictive accuracy and a stable importance ranking led by unemployment and illiteracy.

  • Problems with usual linear models: Linear regression is problematic because residuals are non-normal and urban indicators are strongly correlated, creating multicollinearity.The normality test reports p-value < 10−16, and correlations occur between practically all variable pairs.
  • Problems with usual linear models: 87% of dataset variance is explained by the linear model, but its feature importance can change substantially across resampled datasets.Bootstrapping can make city income appear positively, negatively, or not correlated with homicides.
  • Random forest algorithm: The random forest requires no data transformation or preparation to achieve good prediction accuracy while providing a feature-importance ranking.The model aggregates decision trees trained on subsamples to form predictions and reduce overfitting.
  • Predicting crime with the random forest regressor: 97% accuracy is achieved in some predictions, with average adjusted-R2 equal to 80%; the best average accuracy uses 200 trees and maximum depth 100.Good cross-validated scores are obtained with approximately 20% of the data, or about 1000 cities.
  • Features importance: Unemployment ranks first in importance, followed by illiteracy and male population, while GDP ranks last.The remaining indicators form groups of indistinguishable importance, and the ranking remains stable despite sample fluctuations.
  • Features importance: Past homicides are a poor predictor of future homicides, while the feature-importance ranking remains robust under slight changes in the training sample.This stability is presented as evidence that the random forest detects feature importance robustly.

3. Discussion and conclusions

The random forest approach predicts homicides accurately and yields a stable importance ranking, with unemployment, illiteracy, and male population among the leading indicators. However, the model identifies predictive importance rather than causal direction, and broader method comparisons remain needed.

  • The random forest provides accurate crime predictions and an interpretable ranking of urban indicators.Its feature-importance results remain stable under slight perturbations of the training dataset.
  • The importance ranking groups features with statistically indistinguishable positions, while local feature contributions can vary with thresholds and training samples.The analysis identifies four groups of equally important features and cautions that node-level decompositions depend on sample-imposed thresholds.
  • The model cannot establish whether urban indicators have positive or negative effects on homicides.Further investigation is required to understand local effects, including possible threshold-dependent relationships involving unemployment.
  • Unemployment is the most important feature for describing crime among the 12 urban indicators.The model identifies its relative importance but cannot determine whether unemployment increases or decreases crime.
  • Illiteracy and male population rank second and third, respectively, and both have been linked to violence in prior work.The three leading indicators—unemployment, illiteracy, and male population—explain 78% of the variance in the dataset.
  • Random forest accuracy exceeds the 38% to 39% accuracy previously obtained with simple linear models on the same data.The paper notes that more sophisticated methods could improve prediction further and that full comparisons with alternative methods are still lacking.
  • The ranked indicators may guide the construction of other crime models and inform strategies for reducing crime.The authors specifically identify unemployment and illiteracy as important for describing homicides in Brazil.
Loading 1712.03834v2…