I am trying to construct a neural network as a generative model, to predict the next vector following a sequence of vectors (each vector is a distribution of real numbers of length n).
My thought was to take k previous sequences and concatenate them to have a kxn input vector. To train the model, I would have the next vector in the sequence as the output. As I am looking for non-deterministic output, I was going to use a sigmoid activation function with low gradient.
Does this procedure seem reasonable?
In the hope it does, I tried implementing it in R using both the nnet and neuralnet libraries, but it the documentation and examples I came across, it seems the input and output vectors must be of the same length. What is the syntax to train on input/output vectors of varying length in either of those modules?
A sample of my input vector is:
[,1]
[1,] 0
[2,] 0
[3,] 0.6
[4,] 0.4
[5,] 0
[6,] 0
[7,] 0.06666667
[8,] 0.6666667
[9,] 0
[10,] 0.2666667
[11,] 0
[12,] 0.4
[13,] 0
[14,] 0
[15,] 0.6
And output vector:
[,1]
[1,] 0
[2,] 0
[3,] 0.8571429
[4,] 0
[5,] 0.1428571
N.B. The above sample has n=5, k=3, although my actual dataset has n~200. In both cases, the individual vectors are normalized to 1.
Any help is much appreciated!