I was curious if anyone had any advice on how to reshape data for a recurrent neural network. What I've been doing is array.reshape(len(X_train), # of points in time, # of features)
And then in the array, the X axis represents the features, and for each item, there are entries corresponding to the number of points in time (and a column with id so I know what the original id is). So if the time series has 12 points, each sample will have 12 entries in a row in the array.
Am I reshaping correctly, and if not, how can I reshape correctly?
Edit The array initially looks like this:
This is a pandas array which I convert to numpy by using values.astype(float). The article, and timestep column are just for reference. I am using the command array.reshape(-1, 12, 17) The -1 is the length of the array, 12 is the timesteps (or number of entries in y axis for each article), and the 17 is the number of features at each time step. I am then feeding that data to a recurrent neural network.