# Input shape in a multivariate RNN

So I've seen this: Keras LSTM with 1D time series And this: Multi-dimentional and multivariate Time-Series forecast (RNN/LSTM) Keras

I have many, many, many accountIDs, and 40 or more features associated with them for the start of each week since 2017. I'm attempting to predict expected profit next week (next time step) for a given accountID with a given history (the idea is to modify strategy features, pass them both to the RNN, and see which one has the higher expected profit once the model is trained).

The suggestion provided in the second one I linked is that I make a sub-model for each accountID it seems, but I have many of them and new ones come in all the time.

Should I strip out accountID, but still pass its whole history in as a sequence, and then just append it back after prediction?

What if I only have a few weeks of data for some accounts, and years for others?

The dataset would look roughly like this: (weekstart, accountID, x, y, z, p, q, ...), and each accountID would have many tuples like that, but they wouldn't all have the same number of tuples.

For reference, I'm familiar with CNNs and standard neural networks, but this is my first attempt at using an RNN.

Ok... Take a step back. When you're dealing with RNNs your dataset should have a shape that looks like (nb_samples, nb_timesteps, nb_features) Translating this to your use case means that each account is a sample (what you'll iterate when doing mini-batching), each week is a timestep (what your rnn will iterate over) and your features are.... Features.