do I need to specifically set `insample_size` when...
# neural-forecast
m
do I need to specifically set
insample_size
when calling predict_rolled to get in_sample predictions?
if yes, can someone tell me more about the logic of
insample_size
? it looks like I get widely different return values than the number I pass in. I’d expect insample_size=100 to return 100 in_sample predictions, which looks like is the case, but 110 returns 1100, which seems to be really weird.
I want to integrate neuralforecast into our TS cross validation library, this is the way I’m trying to produce in_sample forecasts: https://github.com/dream-faster/fold-models/pull/9
but I think I’m accidentally using out-of-sample cross-validation and not getting the insample predictions
c
Hi @Mark Aron Szulyovszky! The
predict_rolled
its a wrapper of the
cross_validation
method, where models are not trained. In principle, the model's parameters should not change after using this function.
The basic usage of the
predict_rolled
function is to forecast multiple windows. You can use this function to forecast any fixed number of
n_windows
or subset of your dataset
Y_df
. The
insample_size
in this case is equivalent to the
test_size
of the
cross_validation
method. Anything before the
insample_size
is discarded (except for the last
input_size
window used as inputs for the first forecast).
For example, if you have your dataset of length 1,000, and you set
insample_size
to 900, you will have all the forecasts starting at the 100th timestamp. Also consider adjusting the
step_size
, the default is 1, so it will produce forecasts of size
h
at every timestamp.
m
thank you @Cristian (Nixtla)!
this is what we ended up using, does this look correct to you? thank you!
c
Looks good
@Asterios Tsiourvas here