antoinecarme / pyaf

PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
BSD 3-Clause "New" or "Revised" License
456 stars 73 forks source link

Use MaxAbsScaler for some Multiplicative Signal Transformations #235

Closed antoinecarme closed 1 year ago

antoinecarme commented 1 year ago

PyAF uses a MinMaxScaler for all transformations by default. This introduces zero values in the scaled signal.

https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html#sklearn.preprocessing.MinMaxScaler

image

Multiplicative transformations (RelativeDifference, BoxCox) should work better by using a MaxAbsScaler whic his more adapted for positive signals.

https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MaxAbsScaler.html#sklearn.preprocessing.MaxAbsScaler

image

antoinecarme commented 1 year ago

This "feature" was introduced when twaeking PyAf 5.0-Fixes branck. A commit is already made :

https://github.com/antoinecarme/pyaf/commit/9420fc6c6c794a306258790ef6c97ce5f8166a4b

image

This issue was created to keep track of this significant change as a part of another issue :

234