3
$\begingroup$

From what I know, if the training set shape is [100, 500, 20], it represents 100 samples, each sample being 500 timeseries and each timeseries having 20 features. I'm wondering if I'm passing for example this shaped data, should each sample in order follow a temporal order?

For example, if the first sample start on 1/1/2000, and each timeseries is one day, that means that the first sample will end on 5/15/2001, the second sample starts on 5/16/2001, and so on.

Or could the different samples have different temporal order? For example the first sample starts on 1/1/2000, and ends on 5/15/2001, however the second sample could on 3/15/2002 and ends 500 days later on 7/28/2003 ?

Is this format correct or possible to pass into an RNN? Will the RNN produce good results if the samples are ordered like this?

If not, how should I shape my data so that the RNN will be able to effectively train on data like this?

$\endgroup$

1 Answer 1

2
$\begingroup$

No, they don't need to be ordered as long as they're all in the training set. Just to remind, your validation and test sets should always be chronologically after your training data to prevent data-leakage. But, in your training batch it doesn't matter so you can even shuffle the samples. Batching is for deciding when to update your weights.

$\endgroup$

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.