# Neural Networks for time series

I have an understanding problem. I am a beginner in machine learning and have also a little experience in modelling NNs but not for time series.

But I cannot imagine how to use Neiural Networks for time series.

So if I want to train a Multilayer NN what is the input?

I read several papers about such ANN to predict time series. But they did not explain how actually.

Can I imagine it as follows: Is every input node a specific time stamp?

If I want to predict the value for time t+1, and I use 15 input neurons, so I use the values at each time stamp from t-15 upt to t?

How do I train such a NN?

I am a little confused.

• if you are familiar with python language , there is good explanation about RNN. – Abhishek Verma Jun 3 '17 at 7:22

The type of neural networks you are looking for to predicting timeseries are called recurrent networks; the previous neuron states in the network affect the new neuron states. Examples of such recurrent networks are LSTM, GRU and NARX.

If you have the data from t0 to t10, and you want to predict t11, then you need to input the values from t0- t10 one by one into the network. You have to train the network so that the output of tn is tn+1. So after you have inputted t10, the output will be the values predicted for t11.

Real life example: I want a network to keep on decreasing it's output until it has reached 1, and then make it output 0 to start over again:

in: 0.0, out: 0.2
in: 0.2, out: 0.4
in: 0.4, out: 0.6
in: 0.6, out: 0.8
in: 0.8, out: 1.0
in: 1.0, out: 0.0


And that is what your training data should look like

If it is still to complicated, I recommend you to play around with this front-end neural network library for the browser: Neataptic. It is very easy to fiddle around with. Example

• Thanks. But what about this explanation? It does use a normal NN,right? So where is the difference? stats.stackexchange.com/a/10196 – Tido Jun 2 '17 at 17:33