I want to write a RNN in Deeplearning4j for stock market predictions but I'm struggling with creating und filling the 3-dimensional INDArrays
.
So if I have the following time series:
1 2 3 4 5 6 7 8 9 10
and I want to use 5 values as input and predict the 6th value:
Input: 1 2 3 4 5 TeachingInput: 6
Input: 2 3 4 5 6 TeachingInput: 7
...
I would fill the INDArrays
like this:
int numExamples = 5; //1-5, 2-6,..., 5-9
int inputSize = 5;
int timeSeriesLength = 10;
INDArray features = Nd4j.create(new int[]{numExamples,inputSize,timeSeriesLength}, 'f');
int outputSize = 1;
INDArray labels = Nd4j.create(new int[]{numExamples,outputSize,timeSeriesLength}, 'f');
Is this correct? If so, how do the filled INDArrays
look like for the features, labels, featuresMask and labelsMask?
Thank you.