Financial forecasting (foreign exchange rate, stock prices prediction, …), load demand forecasting, weather forecasting and traffic estimation are just few examples of practical applications where artificial neural networks (ANNs) have been used throughout the years.
Their potential to model any kind of function, of any arbitrary complexity with the right choice of parameters and the right training makes artificial neural networks suitable for this kind of tasks. Generally, anything having a time component is a good candidate for ANN analysis: hence the name time series prediction.
A time series is simply a list of values in time order. In the most common case such a values are collected at the same frequency.
Let’s suppose we have a website and we collect the number of people who visit it everyday. The website is having a big success but we are afraid that, one day, our server will not be powerful enough to handle all the traffic. Thus, we decide to build an ANN to predict the future number of visitors and use this information to eventually upgrade our server.
Which ANN topology should we choose?
In the machine learning literature, multilayer perceptron (MLP) neural networks have been used for long time for prediction tasks but many researchers showed that recurrent neural networks often outperform MLPs. Anyway, each use case is very often a unique case. Understanding the problem is the first step to decide the right neural network topology.
How do we decide the number of input nodes?
Generally, each input node corresponds to a point in time (in our case the number of visits at day t). Increasing the number of input nodes means we are increasing the observation window but more information does not always translate into better prediction. On the other hand, using too few input points could result into a bad modeling process.
What about the output nodes?
It depends on what we want our system to predict. If we are interested in having a “one-step prediction” we should specify one output node only; otherwise we need to have several output nodes, one for each step in the future.
Do we have additional information about the time series we want to predict?
The presence of additional information often increases the accuracy of the model: it could be information about the time series itself, other time series related to it or about the period data is collected. If we know for example that the number of visits is typically higher during the weekend we could use this information as additional input to the ANN.
Could data preprocessing be beneficial?
It has been shown that data preprocessing often helps in having better results. An example of preprocessing is data normalization in a given range but applying additional transformations on input data could be worth.
Time series prediction is actually more than this! Things get more complicated when we want to forecast multiple time series (multivariate time series) that do not seem to be correlated each other. In this case, data preprocessing and the choice of the right data model play a key role for a successful prediction.
If you like the article and/or you have any question feel free to leave a comment!
Graziano Mita
Data Scientist at Ezako