winedarksea / AutoTS

Automated Time Series Forecasting
MIT License
1.05k stars 96 forks source link

support for forecast issue time #235

Open edvin-svk opened 3 months ago

edvin-svk commented 3 months ago

Hello! Is there support for fitting a model with a certain issue/creation time n time steps before the prediction target window? I.e. I want to make the prediction at time t for time steps [t+12, t+12+24] (make prediction at at lunch time for the next days 24 hours).

I could of course extend forecast_length to go far enough into the future, but then I'd like the validation to ignore the first 12 time steps of this forecast length.

winedarksea commented 3 months ago

Assuming I understand correctly, your best plan is to resample the data to a 12 hour frequency instead of hourly frequency. Specify frequency = '12h' or resample before passing into the model. Because yes, it definitely helps focus the model only on the points you care about rather than everything else.

Another option that can help a little is to focus on using the 'ewmae_weighting' in the metric_weighting. This doesn't ignore the first n points but it does weight the accuracy to the end more than the beginning.

No, I don't have support for specifying a 'custom' number of required steps ahead. This is because some models use a forward rolling approach to forecasting (n+1 used for n+2 which is used for n+3, etc) which means you can't really skip steps easily.

I could add per timestep weighting to the metrics, if you really think that would help your use case.