# Time Series Model (n-beats paper) how is sampling / training done?

does any one know what this means?

It is taken from the paper https://openreview.net/pdf?id=r1ecqn4YwB (n-beats time series model).

To update network parameters for one horizon, we sample train batches of fixed size 1024. We pick 1024 TS ids from this horizon, uniformly at random with replacement. For each selected TS id we pick a random forecast point from the historical range of length LH immediately preceding the last point in the train part of the TS. LH is a cross-validated hyperparameter. We observed that for subsets with large number of time series it tends to be smaller and for subsets with smaller number of time series it tends to be larger.

Here another explanation. From a new version of the paper https://arxiv.org/pdf/2002.02887.pdf.

LH is the coefficient defining the length of training history immediately preceding the last point in the train part of the TS that is used to generate training samples. For example, if for M4 Yearly the forecast horizon is 6 and LH is 1.5, then we consider 1.5 · 6 = 9 most recent points in the train dataset for each time series to generate training samples. A training sample from a given TS in M4 Yearly is then generated by choosing one of the most recent 9 points as an anchor. All the points preceding the anchor are used to create the input to N-BEATS, while the points following and including the anchor become training target. Target and history points that fall outside of the time series limits given the anchor position are filled with zeros and masked during the training. We observed that for subsets with large number of time series LH tends to be smaller and for subsets with smaller number of time series it tends to be larger. For example, in massive Yearly, Monthly, Quarterly subsets of M4 LH is equal to 1.5; and in moderate to small Weekly, Daily, Hourly subsets of M4 LH is equal to 10.

The straight forward approach to train would be to go with a sliding window over the timeseries. But as I understand they use some kind auf data augmentation.

Thanks a lot for any hint!