Hi, how can I forecast predictions for new data (w...
# general
a
Hi, how can I forecast predictions for new data (without having
y
values)? In the documentation it says that I can do this using
futr_df
and supplying to it "DataFrame with [
unique_id
,
ds
]", however whenever I try to predict with
nf.predict(futr_df=futr_df)
with
futr_df
having only
unique_id
and
ds
columns it gives all NaNs (and when I add
y
column it works fine, but obviously at prediction time you don't have the
y
column)
c
Hi @Ada Puślecka. The
futr_df
its only for the future exogenous variables. To pass new data, use the
df
argument of the
predict
method. The forecasts will correspond to the future after the last timestamps of the new data.
df
should contain historic values of all the variables used during training, including the target variable
y
and historic exogenous covariates.
👍 1
If you trained the model using historic values of
y
, it must be present in the new data. To train a model that only depends on exogenous covariates you need to set
exclude_insample_y=True
when instantiating the model.
👍 1
a
ah got it, so I don't need to provide a target variable for the period I am forecasting, but just for the previous timesteps so the model can use it for forecasting, thanks. I have one more confusion around forecasting multiple time series at once - is is possible to train the model on set of 10 time series, but then at prediction to forecast only 5 of them because some of the time series finished or do I need to provide all the time series and just pad the series which finished with zeros?
c
You dont need to add all the time series during prediction for univariate models (all except
StemGNN
). Since the
unique_id
is not used by the model, you can pass any new data you want, including new time series.