You are here

Time-Series prediction data

Hi,

I'm trying to configure a time-series network based on the Sunspot example in your Programming Neural Networks with Encog in C#. The network is configured with a past window of 30, future window of 1, 10 values in each point. Your book provided enough reference for me to build the TemporalMLDataSet and successfully train the network. I'm having difficulty configuring data to test the predictive results with multiple values. Can you provide an example of how to accomplish this? Any help is appreciated!

Neural Network Forums: 
RecurrentSurge's picture

I assume you mean that now that you have the entire network trained how to submit new data to it. Basically create some sort of an object where you can pass in your ten values for each point and then once the object has queued up enough data you could recieved the window input data to the network.

That would be a nice utility to add.

fxmozart's picture

You can use :

For multiple inputs :
https://github.com/fxmozart/encog-dotnet-core/blob/Latest/encog-core-cs/...

For single input networks :
You can use the one that is in one of the examples :


public static IMLDataSet ProcessDoubleSerieIntoIMLDataset(double[] data, int _inputWindow, int _predictWindow)
{
var result = new BasicMLDataSet();
int totalWindowSize = _inputWindow + _predictWindow;
int stopPoint = data.Length - totalWindowSize;
for (int i = 0; i < stopPoint; i++)
{
var inputData = new BasicMLData(_inputWindow);
var idealData = new BasicMLData(_predictWindow);
int index = i;
// handle input window
for (int j = 0; j < _inputWindow; j++)
{
inputData[j] = data[index++];
}
// handle predict window
for (int j = 0; j < _predictWindow; j++)
{
idealData[j] = data[index++];
}
var pair = new BasicMLDataPair(inputData, idealData);
result.Add(pair);
}
return result;
}

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer