https://github.com/nixtla logo
m

marah othman

05/15/2023, 2:36 PM
is there any constrain on the period i should predict on the future?
c

Cristian (Nixtla)

05/15/2023, 2:38 PM
Hi @marah othman. By period do you mean the forecast horizon?
m

marah othman

05/15/2023, 2:38 PM
yes how can i choose this period in general
c

Cristian (Nixtla)

05/15/2023, 2:39 PM
The forecast horizon usually depends on the application and task
In most cases it is "given" by the problem itself. For example, in electricity price markets practitioners are interested in day ahead forecasts (h=24). If it is not confidential, can you give more details on your application?
m

marah othman

05/15/2023, 2:42 PM
we also use this period in the past right to train ? or not
c

Cristian (Nixtla)

05/15/2023, 2:42 PM
Yes, models are trained based on the train loss, which depends on the error on the forecasting window, determined by the horizon
m

marah othman

05/15/2023, 2:42 PM
or there any constrain also on the how i should put data to train my models
how much i should put
i dont know if i can put more details buecase i am doing my stage so i should select the most amount for train and for predict
the most good amount
es, models are trained based on the train loss, which depends on the error on the forecasting window, determined by the horizon horizon determin the size of widow ?
c

Cristian (Nixtla)

05/15/2023, 2:46 PM
Models are usually trained on historic data of your variable of interest. You should have a longer history than the horizon. During training, the models are internally creating smaller windows of size
input_size+h
. Using the input window if size
input_size
to forecast the future of size
h
Some common train/test splits percentages are 80/20 or 90/10. You should include enough data to train models. The test data is only reserved for evaluating your model on historic data
m

marah othman

05/15/2023, 2:49 PM
but what about how much can i predict if i have three month for trained data
is reasonable to predict as i want?
c

Cristian (Nixtla)

05/15/2023, 2:50 PM
the horizon must be specified before training the model, models specialize on forecasting that particular horizon. You can't increase it afterwards. What frequency is your data?
m

marah othman

05/15/2023, 2:51 PM
every hour
c

Cristian (Nixtla)

05/15/2023, 2:52 PM
With 3 months of data you might have enough to forecast up to a day, or even week. The performance usually degrades for longer horizons, it is empirical and highly dependent on the data.
m

marah othman

05/15/2023, 2:52 PM
yes if i did for loop and connect the data and stored and predict for h is this reasonable ?
c

Cristian (Nixtla)

05/15/2023, 2:54 PM
Yes, recursive forecasts are a valid and largely used technique. However, we have observed that directly forecasting everything with a large
h
performs better. The performance of you recursive approach might sharply decrease after a couple of iterations due to error accumulation.
m

marah othman

05/15/2023, 2:55 PM
depend on what i should choose the input size ?
c

Cristian (Nixtla)

05/15/2023, 2:57 PM
As a very general rule of thumb, we usually try different input sizes ranging from 2*h to 5*h
m

marah othman

05/15/2023, 2:58 PM
so what do you mean by input-size+h
i am not sure if i understand where we use this one