This message was deleted.
# neural-forecast
s
This message was deleted.
c
in addition to what Kin mentioned, you can have a similar style sampling by specifying the
n_windows
equal to the batch size you want. The WindowsDataset will first sample
batch_size
series, and then select
n_windows
windows from all the constructed windows of the
batch_size
series.
k
Hi @Fabian Müller, thanks for the question. The WindowsDataset is much faster than the previous N-BEATS sampling method. Because we use the PyTorch unfold method with the GPU, creating all the windows and then >>*sampling<<* them, with the `_create_windows_tensor` method. We are thinking to switch the unfold method's place to be within the N-BEATS/N-HiTS PyTorch nn.module, as that would help to avoid incompatibilities with PyTorch and PyTorch Lightning that prefer to operate the Datasets only with cpus. (edited)
c
another advantage of our approach is that it disentangles the number of windows for training and number of series. You might have a dataset with only one time series but want a larger number of windows. If you want same number of series sampled (batch_size) than the final number of windows just set
n_windows
=
batch_size.
.
f
Hi, thanks for the quick and helpful response. I see the performance advantage you mentioned. Especially when you have multiple windows per series. For one window per series I am not sure about it though. Thanks for the
n_windows
=
batch_size
tipp. Will check it out. I also came across the
eq_batch_size
argument in the FastTimeSeriesLoader that I am currently using. But just to be sure, while both methods will result in the number of windows being equal to the batch_size, it is not guaranteed that it will be exactly one window per series. Correct? And what do you think about the stratified sampling as mentioned in the paper? From what I understand, it might be especially relevant for your approach since you sampling from all windows and long series will produce more windows and therefore will be overrepresented in the training?
k
@Fabian Müller We tried in the past "stratified/hierarchical sampling", two ideas around it: • It could be possible to replicate its effects with "weighted sampling" during train, with the current WindowsDataset. • Moving the PyTorch unfold method within the N-BEATS/N-HiTS model would need to use stratified sampling. I would like to try it again.
👍 2