Nixtla / mlforecast

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

add update method to target_transforms #293

Closed jmoralez closed 6 months ago

jmoralez commented 6 months ago

Description

Adds the update method to the target transformations which will be used when calling TimeSeries.update to apply the transformations to new values. Currently only Differences actually updates its stored values, since the impact of not doing it would be greater than for the scalers (so the scalers only transform the new values and keep their original parameters).

The update method isn't declared as abstract in the BaseTargetTransform class in order to not make this a breaking change. If someone wants to use a custom target transformation with TimeSeries.update they should define the update method, otherwise a NotImplementedError will be raised.

Fixes #292

Checklist:

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

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB