https://github.com/nixtla logo
#neural-forecast
Title
# neural-forecast
y

Yalemzewd Nigussie

10/02/2023, 2:11 PM
@Cristian (Nixtla) I have two weeks futr_df, but I need to forecast for 8 weeks. I passed 8 weeks futr_df and worked well. But in you documentation https://nixtla.github.io/neuralforecast/examples/exogenous_variables.html, it says the forecast horizon (h) and len (futr_df) should be equal. I need some clarification on this.
c

Cristian (Nixtla)

10/02/2023, 2:31 PM
Hi @Yalemzewd Nigussie. The horizon defines the number of points to forecast. If you are forecasting 8 values, you need to pass 8 data points in the
futr_df
(per
unique_id
).
We specify it in terms of the horizon (in points) because it does not depend on the sampling frequency. The idea is that for each value you are forecasting you need to have information of the future exogenous.
y

Yalemzewd Nigussie

10/02/2023, 2:46 PM
so, H and len (futr_df) should not necessary be the same?
c

Cristian (Nixtla)

10/02/2023, 2:51 PM
h should be the same as
len(futr_df)/df.unique_id.nunique()
you need h values for each time series
but not any h values, they have to correspond to the exact datestamps you are forecasting. As we show in the tutorial
lets say you have the series with historic dates 1,2,3,4,5,6,7,8, and you are forecasting 9,10,11,12. You need to pass the values of the future variables for 9,10,11,12 dates.
y

Yalemzewd Nigussie

10/02/2023, 2:57 PM
In this example you provided, h=4, but I passed h=12. I got forecast results. There should be an error message to pop up right?
c

Cristian (Nixtla)

10/02/2023, 3:00 PM
Yes. We recently added a protection for this case, but it is currently only in the main branch of the repository. It is not yet in pip
y

Yalemzewd Nigussie

10/02/2023, 3:00 PM
When, you plan that into production?
c

Cristian (Nixtla)

10/02/2023, 3:35 PM
It will be released this week, along other improvements
👍 1
This is the error message you will receive
y

Yalemzewd Nigussie

10/03/2023, 12:02 AM
Thanks, for the update