# Studying Spatial Unevenness of Transport Demand in Cities Using Machine Learning Methods
## 2 Materials and Methods
### Description of Initial Datasets  
A transport macromodel of a large city with a population of 800-850 thousand people can consist of 400 transport areas. This number of areas forms a correspondence matrix of 159,600 correspondence values between areas. With a high density of the road network and the presence of alternative traffic routes, the number of route options increases several-fold. On average, the transport macromodel of the city considers 4-5 transport systems and 8 travel goals, of which the main ones are work-related and educational goals. Dividing the correspondence matrix by purpose and transport means significantly increases the amount of data to be processed and analyzed. All this significantly complicates analyzing the results of modeling and assessing the parameters of the urban transport system. The PTV Visum (V.18) macromodeling program allows taking into account about 50 basic variables that affect the travel time, as well as creating additional attributes in the transport model. All values of the variables of the model are quantitative indicators that vary over a wide range. Determining the travel time and the share of trips by modes of transport in the city macromodel requires a long time because of the functionality of the PTV Visum program and the availability of this software. To increase productivity in assessing the studied parameters and the possibility of conducting research without using expensive software, it was decided to create a neural network model for calculating the travel time. The process of creating a neural network model within the framework of this study consisted of the following steps: obtaining and describing data; data loading; preparing a dataset (eliminating columns, determining independent variables X, dependent variable y, splitting into training and test sets, data standardization); creation of neural network architecture; search for optimal parameters of the neural network; training; prediction of y values; assessment of model accuracy; saving the model and its further use with the help of a computer program [28]. A mechanism was chosen to implement a fully connected neural network (an ANN model) with hidden layers for regression problems [29; 30]. Using the data from the transport macromodel of the city created in the PTV Visum program, 3 datasets were obtained; they were used in the research with different goals and at different stages. The used macromodel of the city is shown in Figure 1.  
The research was carried out in 3 stages. In the first stage, the system evaluates the travel time (correspondence time) for all possible correspondence matrix variants. In this stage, the travel time is change-dependent and is determined by a large number of factors. In the second stage, the shares of the use of travel modes and transport modes were assessed for each travel option. In this stage, the travel time will become the main factor affecting the share of trips by private and PT. Due to the large number of parameters evaluated at the first and second stages, a decision was made to use a neural network model to reduce the complexity of calculations. In the third stage, clustering of city areas was carried out according to the criterion of the share of trips by private and PT. These two transport methods were chosen because they have the largest share in citizen mobility compared to pedestrian traffic or the use of cycling and personal mobility devices. The transition from estimating the share of trips by correspondence to shares by area is due to several reasons:  
* One road section can duplicate a large number of trips by private and PT, as well as public transport routes. In this case, there may be different effects and efficiencies between transport systems and individual trips within a single system for reducing time loss in traffic. * The use of measures to reduce the share of trips by private cars has a greater effect when implementing measures that promote the use of PT and eliminating the reasons that restrain it.