https://github.com/nixtla logo
#general
Title
# general
a

Ada Puślecka

08/24/2023, 7:17 PM
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

Cristian (Nixtla)

08/24/2023, 7:18 PM
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

Ada Puślecka

08/25/2023, 7:22 AM
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

Cristian (Nixtla)

08/25/2023, 11:57 AM
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.
3 Views