Nixtla / mlforecast

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

support fitted inverse transform in LocalStandardScaler #206

Closed jmoralez closed 1 year ago

jmoralez commented 1 year ago

Description

The LocalStandardScaler didn't support inverting the fitted values, even if it didn't produce an error. This adds an invert_transform_fitted method to the BaseTargetTransform class since the logic is a bit different to restore the fitted values. Mainly, when predicting we know each serie has "h" values (the horizon), so computing the sizes is very easy, whereas when restoring the fitted values we have to compute the sizes, which can be expensive. Also when predicting we may only want a subset of ids, and on fitted we restore every serie.

Checklist:

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB