Nixtla / mlforecast

Scalable machine 🤖 learning for time series forecasting.
https://nixtlaverse.nixtla.io/mlforecast
Apache License 2.0
841 stars 80 forks source link

fix X_df slices #228

Closed jmoralez closed 11 months ago

jmoralez commented 11 months ago

Description

The X_df dataframe is sorted by id and time and was then sliced in each step by moving an n_series sized window, which was wrong. The correct slice is taking a range that starts at the current predict step and offsets each element by h, thus taking the first date of each id in step 0, the second date of each id in step 1 and so on.

Checklist:

review-notebook-app[bot] commented 11 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB