Reconstructing Commuter Networks Using Machine Learning And Urban Indicators

Humans are bound to move inter-urban areas on a daily basis, and understanding human mobility is vital to explain the processes related to this human phenomenon [1]. Human mobility is an interdisciplinary topic with influence from multiple areas of knowledge [2], such as geography, physics, and social sciences. Better models to describe human mobility can support urban planning activities [3, 4, 5, 6], help forecast the spread of epidemics [7, 8, 9], and prevent catastrophic events [10].

Throughout decades, several laws were stated to describe the mobility phenomenon, such as the laws of migration [11] and the law of intervening opportunities [12], but just recently they were revealed not to be suitable to most mobility-related scenarios [13]. Consequently, we still lack an accurate model to understand the complexities behind this human behavior, especially with respect to the pendular movement in inter-urban areas.


Figure 1: An illustration of the human-mobility problem concerning the citizens’ choice of where to work based on distance, job opportunities, housing prices, medical assistance, and other urban indicators — Image reproduced from Spadon, G. et al. [14] “Reconstructing commuters network using machine learning and urban indicators,” Scientific Reports 9(1), 11801, licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).
One of the big problems to solve in human mobility is to predict the flow of people from one area to another, which consists of estimating the average number of commuters between any two locations per unit time. According to Barbosa et al. [1], research in this area has the potential to reveal the reasons that cause someone to work in a nearby or far away city and how one chooses a city to work or live in (see Figure 1). The state-of-the-art models used on human-mobility modeling assume that the number of people traveling between any two regions decreases linearly regarding the distance between them and is proportional to the size of the population of these regions [15, 16, 17, 13]. This assumption is not always true, as other factors related to urban systems can increase or decrease the human flow; this is the case of underlying transportation networks [18], socioeconomic factors [11, 12, 19, 20], and traffic bottlenecks [21].

Along these lines, we propose a novel approach to quantify the flow of people and reconstruct the network topology of human mobility through supervised machine learning algorithms of classification and regression. These algorithms adapt at each iteration to learn from the data, which improves the prediction ability of the model, making the results more accurate. Both classifiers and regressors are based on the classical machine learning paradigm, according to which the machine uses features to learn a model able to predict the labels (classes) in a two-stage process: training and testing [23].

Figure 2: An illustration of the Brazilian commuters’ network. Notice that due to the high overlap of edges, we used an Edge Bundling technique [22] to enhance the visualization — Image reproduced from Spadon, G. et al. [14] “Reconstructing commuters network using machine learning and urban indicators,” Scientific Reports 9(1), 11801, licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).
We use yearly-updated urban indicators as features, which describe traits related to the quality of life and work in cities from the perspective of the economic, political, social, and environmental spheres [19]. We draw our analysis on 45 urban indicators of 5,565 Brazilian municipalities and the daily number of people commuting between every city of our data set (see Figure 2). We demonstrate that, when compared to our approach, previous models have a lower performance in predicting unweighted links between two given cities and also in predicting weighted links. A weighted prediction means that, besides foreseeing the link between cities, it also predicts the number of commuters.

The model we propose, which relies on gradient-based machine learning algorithms, can predict the links of the commuter network with 90.4% of accuracy and weight these same links with 77.6% of the variance between the predicted and the observed flow of people between cities. Moreover, we use SHapley Additive exPlanations [24] (SHAP) values to interpret the results of the machine learning model so to quantify the importance of each feature in the prediction task. Through this technique, it was possible to identify which are the most important features to describe the phenomenon of human mobility. We notice that not only is distance critical in shaping human mobility, but also other variables such as GDP and unemployment rate play important roles in this phenomenon.



The authors would like to thank Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brazil (CAPES) – Finance Code 001; Fundaçõ de Amparo à Pesquisa do Estado de São Paulo (FAPESP), grants 2013/07375-0, 2014/253370, 2016/16987-7, 2016/17078-0, 2017/08376-0, and 2019/04461-9; Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) grants 303694/20157, 404870/2016-3, 167967/2017-7, and 305580/2017-5; and Intel for their financial support.

These findings are described in the article entitled Reconstructing commuters network using machine learning and urban indicators, recently published in the journal Scientific Reports.

  1. H. Barbosa, M. Barthelemy, G. Ghoshal, C. R. James, M. Lenormand, T. Louail, R. Menezes, J. J. Ramasco, F. Simini, and M. Tomasini, “Human mobility: Models and applications,” Physics Reports, vol. 734, pp. 1–74, 2018.
  2. E. L. Ullman, Geography as spatial interaction. University of Washington Press, 1980.
  3. D. A. Krueckeberg and A. L. Silvers, Urban planning analysis: methods and models. John Wiley & Sons, 1974.
  4. M. Batty, “The size, scale, and shape of cities,” science, vol. 319, no. 5864, pp. 769–771, 2008.
  5. M. Batty and P. A. Longley, Fractal cities: a geometry of form and function. Academic press, 1994.
  6. I. Benenson, P. M. Torrens, and P. Torrens, Geosimulation: Automatabased modeling of urban phenomena. John Wiley & Sons, 2004.
  7. S. Eubank, H. Guclu, V. A. Kumar, M. V. Marathe, A. Srinivasan, Z. Toroczkai, and N. Wang, “Modelling disease outbreaks in realistic urban social networks,” Nature, vol. 429, no. 6988, p. 180, 2004.
  8. V. Colizza, A. Barrat, M. Barthélemy, and A. Vespignani, “The role of the airline transportation network in the prediction and predictability of global epidemics,” Proceedings of the National Academy of Sciences, vol. 103, no. 7, pp. 2015–2020, 2006.
  9. D. Balcan, V. Colizza, B. Gonc¸alves, H. Hu, J. J. Ramasco, and A. Vespignani, “Multiscale mobility networks and the spatial spreading of infectious diseases,” Proceedings of the National Academy of Sciences, pp. pnas– 0906910106, 2009.
  10. M. Carter, M. P. Howard, N. D. Owens, D. Register, J. Kennedy, K. K. Pecheux, A. Newton, et al., “Effects of catastrophic events on transportation system management and operations: Howard street tunnel fire baltimore city, maryland–july 18, 2001,” 2002.
  11. E. G. Ravenstein, “The laws of migration,” Journal of the statistical society of London, vol. 48, no. 2, pp. 167–235, 1885.
  12. S. A. Stouffer, “Intervening opportunities: A theory relating mobility and distance,” American Sociological Review, vol. 5, no. 6, pp. 845–867, 1940.
  13. A. P. Masucci, J. Serras, A. Johansson, and M. Batty, “Gravity versus radiation models: On the importance of scale and heterogeneity in commuting flows,” Physical Review E, vol. 88, no. 2, p. 022812, 2013.
  14. G. Spadon, A. C. P. L. F. d. Carvalho, J. F. Rodrigues-Jr, and L. G. A. Alves, “Reconstructing commuters network using machine learning and urban indicators,” Scientific Reports, vol. 9, no. 1, p. 11801, 2019.
  15. G. K. Zipf, “The p1p2/d hypothesis: on the intercity movement of persons,” American Sociological Review, vol. 11, no. 6, pp. 677–686, 1946.
  16. W.-S. Jung, F. Wang, and H. E. Stanley, “Gravity model in the korean highway,” EPL (Europhysics Letters), vol. 81, no. 4, 2008.
  17. F. Simini, M. C. González, A. Maritan, and A.-L. Barabási, “A universal model for mobility and migration patterns,” Nature, vol. 484, no. 7392, p. 96, 2012.
  18. Y. Ren, M. Ercsey-Ravasz, P. Wang, M. C. González, and Z. Toroczkai, “Predicting commuter flows in spatial networks using a radiation model based on temporal ranges,” Nature Communications, vol. 5, p. 5347, 2014.
  19. L. M. A. Bettencourt, “The Origins of Scaling in Cities,” Science, vol. 340, pp. 1438–1441, jun 2013.
  20. T. Louail, M. Lenormand, M. Picornell, O. G. Cantú, R. Herranz, E. FriasMartinez, J. J. Ramasco, and M. Barthelemy, “Uncovering the spatial structure of mobility networks,” Nature Communications, vol. 6, p. 6007, 2015.
  21. R. Louf and M. Barthelemy, “Modeling the polycentric transition of cities,” Physical Review Letters, vol. 111, no. 19, p. 198702, 2013.
  22. D. C. Moura, “3D Density Histograms for Criteria-driven Edge Bundling,” ArXiv e-prints, Apr. 2015.
  23. J. Gama, A. C. P. d. L. Carvalho, K. Faceli, A. C. Lorena, M. Oliveira, et al., Extração de conhecimento de dados: data mining. Edições Sílabo, 2015.
  24. S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” in Advances in Neural Information Processing Systems, pp. 4765–4774, 2017.



Using Siglec-8 Endocytic Mechanisms To Target Human Eosinophils And Malignant Mast Cells

Pharmacological selectivity remains a critical goal in medicine. Most drugs act on a number of molecular targets and are also […]

Microbial Taxa Exhibit Distinct Biogeographic Patterns Depending On How Rare They Are

In 1934, Baas Becking had already anticipated the fundamental role played by environmental conditions in shaping microbial communities, by stating […]

Venom Can Be Used As Future Therapeutic Agents Against Cancer, TB, And HIV/AIDS

Venom is a secretion produced by specific animals, which is synthesized in the specialized cells of their body. Animal venoms […]

Resolving Nightmares Using A Lucid Dreaming Technique

Imagine that you could become aware that you were dreaming, or “lucid,” in your dreams at any time. Countless researchers […]

Climate Change Mitigation Policies Could Facilitate Universal Electricity Access In Sub-Saharan Africa

Energy is fundamental to development. SDG7 acknowledges that ensuring access to affordable, reliable, sustainable, and modern energy for all is […]

Exploring Virus-Host Interaction Between Influenza A Virus And The Human Lung

Influenza A viruses (IAVs) are well known for annual, seasonal disease outbreaks resulting in mild to severe consequences from economic […]

Temporal And Spatial Aspects Of The Hurst Phenomenon In Precipitation

The Hurst phenomenon is a behavior observed in geophysical processes in which wet or dry years are clustered during long time […]

Science Trends is a popular source of science news and education around the world. We cover everything from solar power cell technology to climate change to cancer research. We help hundreds of thousands of people every month learn about the world we live in and the latest scientific breakthroughs. Want to know more?