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

Add Differentiable Variant of SMAPE Performance Measure #221

Closed antoinecarme closed 1 year ago

antoinecarme commented 1 year ago

PyAF can be configured to use MAPE, SMAPE and many other performance measures to perform model selection.

MAPE and SMAPE are sensitive to zero values in the signal/forecast.

Differentiable SMAPE (Suilin, 2017) is a recent variant of the SMAPE that makes it not only smooth, differentiable but also more resistant to zero values.

Found in : https://cbergmeir.com/talks/FFDS_ACML2020.pdf (page 104)

image

Original source code : https://www.kaggle.com/code/asuilin/smape-variants/notebook https://www.kaggle.com/c/web-traffic-time-series-forecasting/discussion/39529

To be included in the next PyAF release (5.0, expected on 2023-07-14).

antoinecarme commented 1 year ago

Ozone model with MAPE (default)

image

antoinecarme commented 1 year ago

Ozone with differentiable SMAPE

image

antoinecarme commented 1 year ago

FIXED.

Closing.