# Traffic jams from the future

- From RSS

As users from Moscow could notice, today on the Yandex main page a new informer appeared - a traffic jam forecast. It is designed to help motorists plan their movements.

It appears when at least once in the next five hours three or more points are expected. Readings are updated every 10 minutes. This functionality, like many, was born out of a hypothesis - evening traffic jams directly depend on the day of the week, month and morning traffic jams, because most of those who come to the center will need to come back.

To test the hypothesis, we decided to use a neural network. If it’s simple, then the neural network is a kind of “black box”, to which you know the known factors and conditions, and it processes them and issues a solution to the problem. More serious definitions can be found in dictionaries.. Such networks are used, for example, to distribute web traffic between servers or to control city traffic lights.

For the experiment, we took the public library of artificial neural networks FANN . We trained the network using the two-year Yandex.Traffic archive and got the first results. After comparing the forecast with reality, it became clear that the hypothesis was confirmed. And then the conversation turned to the weather. But not because all topics have been exhausted.

It's no secret that precipitation affects the road situation in the city. If it rains or snows, drivers expect trouble. We took a weather archive and retrained the networks taking into account data on precipitation, temperature and pressure changes over two years. By the way, in the process of studying the prediction of the score, we noticed one fact that was surprising at first glance.

Information about precipitation or not, much less affects the accuracy of the forecast than the number of millimeters of mercury and degrees Celsius. Which, in fact, is logical, because precipitation depends on these two indicators, and the indicators themselves are much more accurate than "rain in some places".

After adding weather data, the accuracy of the forecast improved, and we thought about the product itself. Initially, we were going to predict only evening traffic jams in the morning. But then they thought it was too narrow. And they decided to predict all day - from the morning and five hours ahead.

To reduce the likelihood of error, we calculate the forecast immediately in three independent neural networks that were trained separately from each other. The main page displays the rounded arithmetic mean of their results.

Of course, this informer is not an accurate measuring device. It shows in which direction the situation will develop. The probability of predicting point to point now varies on average from 60 to 77% - it turns out better to guess, the closer the future to the present.

It appears when at least once in the next five hours three or more points are expected. Readings are updated every 10 minutes. This functionality, like many, was born out of a hypothesis - evening traffic jams directly depend on the day of the week, month and morning traffic jams, because most of those who come to the center will need to come back.

To test the hypothesis, we decided to use a neural network. If it’s simple, then the neural network is a kind of “black box”, to which you know the known factors and conditions, and it processes them and issues a solution to the problem. More serious definitions can be found in dictionaries.. Such networks are used, for example, to distribute web traffic between servers or to control city traffic lights.

For the experiment, we took the public library of artificial neural networks FANN . We trained the network using the two-year Yandex.Traffic archive and got the first results. After comparing the forecast with reality, it became clear that the hypothesis was confirmed. And then the conversation turned to the weather. But not because all topics have been exhausted.

It's no secret that precipitation affects the road situation in the city. If it rains or snows, drivers expect trouble. We took a weather archive and retrained the networks taking into account data on precipitation, temperature and pressure changes over two years. By the way, in the process of studying the prediction of the score, we noticed one fact that was surprising at first glance.

Information about precipitation or not, much less affects the accuracy of the forecast than the number of millimeters of mercury and degrees Celsius. Which, in fact, is logical, because precipitation depends on these two indicators, and the indicators themselves are much more accurate than "rain in some places".

After adding weather data, the accuracy of the forecast improved, and we thought about the product itself. Initially, we were going to predict only evening traffic jams in the morning. But then they thought it was too narrow. And they decided to predict all day - from the morning and five hours ahead.

To reduce the likelihood of error, we calculate the forecast immediately in three independent neural networks that were trained separately from each other. The main page displays the rounded arithmetic mean of their results.

Of course, this informer is not an accurate measuring device. It shows in which direction the situation will develop. The probability of predicting point to point now varies on average from 60 to 77% - it turns out better to guess, the closer the future to the present.