1
$\begingroup$

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.

$\endgroup$
0

1 Answer 1

0
$\begingroup$

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.

Now... Don't use accountID as a feature. That's just an ID with no prediction power. Also try to add some seasonality features, like month or something. Does that help you out?

$\endgroup$
1
  • $\begingroup$ Okay I think I get it then, I was just confused what the "sample" was as far as the batching was concerned. Thank you! $\endgroup$
    – CapnShanty
    Commented Dec 21, 2018 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.