Deep Learning for Crime Forecasting of Multiple Regions, Considering Spatial–Temporal Correlations between Regions †
Abstract
:1. Introduction
- ✓
- Comparisons between deep learning models that are capable of forecasting crimes for multiple regions.
- ✓
- The incorporation of the spatial–temporal correlations between regions in the models and evaluation of its influence on the prediction performance.
- ✓
- The evaluation of the performance of models for crime prediction in a small country.
2. Literature Review
3. Materials and Methods
3.1. Data
3.2. Models
- SARIMAX models were developed using the auto.arima function of the pmdarima Python module. AIC criteria in 25 iterations were applied to select the configuration of the best model.
- Long short-term memory (LSTM) with three layers: input layer + LSTM (for month and week (recurrent units = 60, activation = linear)) + dense layer. The learning rate was 0.0001 for month and week.
- Temporal Convolutional Network (TCN) with three layers: input layer + TCN (for month (132 filters, kernel = 2, activation = tanh), for week (12 filters, kernel = 6, activation = linear)) + dense layer. The learning rate was 0.0001 for month and 0.01 for week.
- Encoder transformer with the following: input layer+ multi-head attention (for month (head size = 512, heads = 2), for week (head size = 128, heads = 4)) + dropout (for month 30% and for week 20%) + layer normalization+ convolutional 1D + dropout (for month 30% and for week 20%) + convolutional 1D + layer normalization + multi-head attention (for month (head size = 512, heads = 2), for week (head size = 128, heads = 4)) + dropout (for month 30% and for week 20%) + layer normalization + convolutional 1D + dropout (for month 30% and for week 20%) + convolutional 1D + layer normalization + global average pooling 1D + dense layer (256, activation = linear) + dropout (for month 30% and for week 20%) + dense layer (128, activation = linear) + dropout (for month 30% and for week 20%) + dense layer. The learning rate was 0.0001 for month and 0.001 for week.
- Classical transformer encoder–decoder with the following: input layer + two encoders (head size = 512, heads = 8, feed forward encoder = 2048, dropout = 20%) + two decoders (head size = 512, heads = 8, feed forward decoder = 2048 + dropout = 20%).
- LSTM encoder–decoder with the following: input layer + encoder LSTM (for month (60 recurrent units, activation = linear), for week (108 recurrent units, activation = tanh)) + decoder LSTM (for month (60 recurrent units, activation = linear), for week (108 recurrent units, activation = tanh)) + time distributed layer (output Is obtained separately for each time step). The learning rate was 0.001 for month and 0.0001 for week.
3.3. The Input–Output of the Models
3.4. Spatial–Temporal Correlation
- Compute the partial autocorrelations between the time series and the 8 lags (12 lags for the monthly dataset) of the remaining time series.
- Obtain the average partial autocorrelations between the time series and the remaining time series.
- Obtain the top 5 average partial autocorrelations to identify the regions more related to the count of crimes of region j.
3.5. Experimental Procedure
4. Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Butt, U.M.; Letchmunan, S.; Hassan, F.H.; Koh, T.W. Hybrid of deep learning and exponential smoothing for enhancing crime forecasting accuracy. PLoS ONE 2022, 17, e0274172. [Google Scholar] [CrossRef] [PubMed]
- Meijer, A.; Wessels, M. Predictive Policing: Review of Benefits and Drawbacks. Int. J. Public Adm. 2019, 42, 1031–1039. [Google Scholar] [CrossRef]
- Kounadi, O.; Ristea, A.; Araujo, A.; Leitner, M. A systematic review on spatial crime forecasting. Crime Sci. 2020, 9, 7. [Google Scholar] [CrossRef] [PubMed]
- Solís, M.; Calvo-Valverde, L.-A. Performance of Deep Learning models with transfer learning for multiple-step-ahead forecasts in monthly time series. Intel. Artif. 2022, 25, 110–125. [Google Scholar] [CrossRef]
- Solís, M.; Calvo-Valverde, L.-A. A Proposal of Transfer Learning for Monthly Macroeconomic Time Series Forecast. Eng. Proc. 2023, 39, 58. [Google Scholar] [CrossRef]
- Mariano-Hernández, D.; Hernández-Callejo, L.; Solís, M.; Zorita-Lamadrid, A.; Duque-Perez, O.; Gonzalez-Morales, L.; Santos-García, F. A Data-Driven Forecasting Strategy to Predict Continuous Hourly Energy Demand in Smart Buildings. Appl. Sci. 2021, 11, 7886. [Google Scholar] [CrossRef]
- Alghamdi, J.; Huang, Z. Modeling Daily Crime Events Prediction Using Seq2Seq Architecture. In Databases Theory and Applications, Proceedings of the 32nd Australasian Database Conference, ADC 2021, Dunedin, New Zealand, 29 January–5 February 2021; Springer: Cham, Switzerland, 2021; pp. 192–203. [Google Scholar] [CrossRef]
- Anuvarshini, S.R.; Deeksha, N.; Deeksha, S.C.; Krishna, S.K. Crime Forecasting : A Theoretical Approach. In Proceedings of the 2022 IEEE 7th International Conference on Recent Advances and Innovations in Engineering (ICRAIE), Mangalore, India, 1–3 December 2022. [Google Scholar] [CrossRef]
- Dong, Q.; Li, Y.; Zheng, Z.; Wang, X.; Li, G. ST3DNetCrime: Improved ST-3DNet Model for Crime Prediction at Fine Spatial Temporal Scales. ISPRS Int. J. Geo-Inf. 2022, 11, 529. [Google Scholar] [CrossRef]
- Sharmin, S.; Alam, F.I.; Das, A.; Uddin, R. An Investigation into Crime Forecast Using Auto ARIMA and Stacked LSTM. In Proceedings of the 2022 International Conference on Innovations in Science, Engineering and Technology (ICISET), Chittagong, Bangladesh, 26–27 February 2022. [Google Scholar] [CrossRef]
- Ibrahim, N.; Wang, S.; Zhao, B. Spatiotemporal Crime Hotspots Analysis and Crime Occurrence Prediction. In Advanced Data Mining and Applications, Proceedings of the 15th International Conference, ADMA 2019, Dalian, China, 21–23 November 2019; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2019; pp. 579–588. [Google Scholar] [CrossRef]
- Stec, A.; Klabjan, D. Forecasting crime with deep learning. arXiv 2018, arXiv:1806.01486. [Google Scholar]
- Stalidis, P.; Semertzidis, T.; Daras, P. Examining Deep Learning Architectures for Crime Classification and Prediction. Forecasting 2021, 3, 741–762. [Google Scholar] [CrossRef]
- Rayhan, Y.; Hashem, T. AIST: An Interpretable Attention-Based Deep Learning Model for Crime Prediction. ACM Trans. Spat. Algorithms Syst. 2023, 9, 1–31. [Google Scholar] [CrossRef]
- Hu, K.; Li, L.; Liu, J.; Sun, D. DuroNet. ACM Trans. Internet Technol. 2021, 21, 1–24. [Google Scholar] [CrossRef]
- Cruz-Nájera, M.A.; Treviño-Berrones, M.G.; Ponce-Flores, M.P.; Terán-Villanueva, J.D.; Castán-Rocha, J.A.; Ibarra-Martínez, S.; Santiago, A.; Laria-Menchaca, J. Short Time Series Forecasting: Recommended Methods and Techniques. Symmetry 2022, 14, 1231. [Google Scholar] [CrossRef]
- Herbold, S. Autorank: A Python package for automated ranking of classifiers. J. Open Source Softw. 2020, 5, 2173. [Google Scholar] [CrossRef]
Input Array | Output Vector | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Variables | i − 8 | i − 7 | i − 6 | i − 5 | i − 4 | i − 3 | i − 2 | i − 1 | i + 0 | i + 1 | i + 2 | i + 3 | i + 4 | i + 5 | i + 6 | i + 7 |
region j | 11 | 25 | 38 | 30 | 29 | 28 | 31 | 29 | 33 | 31 | 21 | 29 | 33 | 27 | 25 | 26 |
region 1 | 36 | 60 | 51 | 44 | 70 | 66 | 46 | 64 | ||||||||
region 2 | 19 | 37 | 33 | 39 | 36 | 39 | 45 | 45 | ||||||||
region 3 | 22 | 31 | 27 | 36 | 50 | 31 | 42 | 29 | ||||||||
region 4 | 17 | 29 | 31 | 36 | 43 | 44 | 42 | 43 | ||||||||
region 5 | 14 | 17 | 26 | 22 | 21 | 38 | 31 | 34 | ||||||||
month | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | ||||||||
week | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||||||||
code j | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
Horizon | Percentile | Trend | Non-Linear | Cv | Mean |
---|---|---|---|---|---|
3-month | 0–25 | 0.58 | 0.40 | 23.8 | 121.9 |
25–50 | 0.53 | 0.52 | 30.8 | 44.3 | |
50–75 | 0.48 | 0.37 | 33.0 | 34.2 | |
75–100 | 0.35 | 0.43 | 51.6 | 10.2 | |
12-month | 0–25 | 0.57 | 0.43 | 24.3 | 122.7 |
25–50 | 0.53 | 0.46 | 29.9 | 38.9 | |
50–75 | 0.40 | 0.27 | 37.4 | 21.9 | |
75–100 | 0.43 | 0.55 | 47.8 | 26.3 | |
2-week | 0–25 | 0.51 | 0.50 | 38.5 | 27.8 |
25–50 | 0.40 | 0.30 | 56.2 | 8.4 | |
50–75 | 0.31 | 0.17 | 75.8 | 5.3 | |
75–100 | 0.35 | 0.19 | 64.9 | 5.7 | |
8-week | 0–25 | 0.53 | 0.48 | 44.0 | 27.0 |
25–50 | 0.36 | 0.29 | 54.7 | 8.6 | |
50–75 | 0.36 | 0.22 | 68.8 | 6.4 | |
75–100 | 0.34 | 0.18 | 67.4 | 5.2 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Solís, M.; Calvo-Valverde, L.-A. Deep Learning for Crime Forecasting of Multiple Regions, Considering Spatial–Temporal Correlations between Regions. Eng. Proc. 2024, 68, 4. https://doi.org/10.3390/engproc2024068004
Solís M, Calvo-Valverde L-A. Deep Learning for Crime Forecasting of Multiple Regions, Considering Spatial–Temporal Correlations between Regions. Engineering Proceedings. 2024; 68(1):4. https://doi.org/10.3390/engproc2024068004
Chicago/Turabian StyleSolís, Martín, and Luis-Alexander Calvo-Valverde. 2024. "Deep Learning for Crime Forecasting of Multiple Regions, Considering Spatial–Temporal Correlations between Regions" Engineering Proceedings 68, no. 1: 4. https://doi.org/10.3390/engproc2024068004