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.

About The Author

Gabriel Spadon

Gabriel Spadon is a Ph.D. candidate at the University of Sao Paulo, Brazil. His research focus is the analysis and characterization of real-world systems in the form of complex networks. He has published on topics in knowledge discovery in graphs and data-driven decision making. He is presently working on the analysis and optimization of urban systems using complex networks, data mining, and related concepts.

Jose F Rodrigues-Jr

Jose F Rodrigues-Jr is a tenured Professor at University of Sao Paulo, Brazil. He received his Ph.D. from this same university, part of which was carried out at Carnegie Mellon University, USA, in 2007. Rodrigues is a regular reviewer and author in his field, having contributed with publications in major journals and conferences. His topics of research include data analysis, content-based data retrieval, visualization, and the application of such techniques in the analysis of e-learning domains.

Speak Your Mind!


Element Abundances And The Source Of Solar Energetic Particles

The Sun can emit intense bursts of high-energy particles that can fill a large volume of the heliosphere and last several days.  The largest of these solar-energetic-particle (SEP) events are accelerated at fast shock waves driven out from the Sun by coronal mass ejections (CMEs).  These shock waves randomly sample and accelerate all the chemical elements […]

Measuring Ecosystem Responses To Water Availability: How Dry Is Too Dry To Hinder Evapotranspiration?

Drought is one of the most devastating natural disasters that can cause serious agricultural, economic, and social impacts around the globe. Several studies project increased aridity over land and more widespread droughts associated with the changing climate, which could have profound impacts on agriculture, ecosystem service, and human welfare. Yet, most of the existing drought […]

How Does Soap Work?

How soap works is due to its unique chemistry, the hydrophilic (loves water) and hydrophobic (hates water) parts of soap act to combine soapy water with grease, dirt, or oil. This combination creates clusters of soap, water, and grime called micelles. Soap is a product that most of us use every day, yet most of […]

Gravity Science Investigation With NASA’s Europa Clipper Mission

The Department of Earth, Planetary, and Space Science (EPSS) at UCLA has an impressive record of leadership or participation in NASA missions. For example, the Galileo mission explored Jupiter and its moons between 1995 and 2003. EPSS Professor Margaret G. Kivelson was the Principal Investigator of the Galileo magnetometer instrument. Using magnetometer measurements, Prof. Kivelson […]

New Vaccine Effective At Eliminating Cancer In Mice

Researchers have been looking to develop vaccines against cancer for a long time now, and an advancement in that field has just been made thanks to a team of researchers from Scripps Research Institute and the University of Texas Southwestern Medical Center. The team of researchers succeeded in developing a vaccine utilizing an immunotherapy drug […]

What Is Rose Quartz?

Rose quartz is a specific mineral variety of crystalline quartz that is characterized by its soft pinkish hue. The particular shade of rose quartz is due to trace amounts of titanium, manganese, iron, or dumortierite embedded in its crystalline structure. Despite being one of the least common versions of quartz, rose quartz is still commonly found in […]

What Is Biomagnification?

Biomagnification is the process in which toxins are concentrated in an organism as larger animals continue to eat smaller animals. This process moves toxins up the food chain to larger organisms and is of particular concern with regards to concentrating dangerous toxins in larger species. There are many biological processes in the world and many […]