:: AForge.NET Framework :: Articles :: Forums ::

Multi-input time series prediction

The forum is to discuss topics from different artificial intelligence areas, like neural networks, genetic algorithms, machine learning, etc.

Multi-input time series prediction

Postby blueraccoon » Sat Apr 25, 2009 4:32 pm


I am using the Neuro library to perform some simple time series prediction, however I'm looking to include multiple inputs for each time step. I'm confused as to the relationship between the inputs and the window size.

Do I just create inputs x window size data points for each time step and feed them in as a single input vector?
e.g. For window size = 10 and inputs =2 : 10 previous values for input 1 + 10 previous values for input 2 = 20 input values in total.
In this case how does the network know that there are really two windows each belonging to one input? Does it need to know?

I'd really appreciate some ideas on how to approach this, even if it means some code modifications.


Posts: 2
Joined: Sat Apr 25, 2009 4:17 pm

Re: Multi-input time series prediction

Postby andrew.kirillov » Sun Apr 26, 2009 8:04 pm


If I understood you correctly, then you have one output value formed from two inputs (where each input may have up to 10 values, which depend on window size). If it is so, then just mix two inputs to get one input vector, which includes both inputs (20 values = 10 from imput1 + 10 from input2). The network does not need to know where input1 or input2 in the vectors are. If you use the same order of values during training and afterwards, then everything should be fine.

Even with single input, which has 10 values, the network does not know where the value at time t-1 or t-10 is placed. It is your responsibility to pack the input vector in the same way for both training and real work.
With best regards,

Interested in supporting AForge.NET Framework?
User avatar
Site Admin, AForge.NET Developer
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Multi-input time series prediction

Postby blueraccoon » Sun Apr 26, 2009 10:46 pm

Hi Andrew and thanks for the reply.

That's what I was hoping you'd say! So the network learns the meaning of the input values in relation to each other - makes sense now I think about it. All I need now is to update your sample to normalise the extra inputs and merge them into a single input vector per time step. I'll post the code if I come up with anything generic.
Posts: 2
Joined: Sat Apr 25, 2009 4:17 pm

Return to Artificial Intelligence