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
459 stars 72 forks source link

Add LnQ Performance measure #43

Closed antoinecarme closed 3 years ago

antoinecarme commented 7 years ago

According to :

https://en.wikipedia.org/wiki/Symmetric_mean_absolute_percentage_error

A limitation to SMAPE is that if the actual value or forecast value is 0, the value of error will boom up to the upper-limit of error. (200% for the first formula and 100% for the second formula).

Provided the data are strictly positive, a better measure of relative accuracy can be obtained based on the log of the accuracy ratio: log(Ft / At) This measure is easier to analyse statistically, and has valuable symmetry and unbiasedness properties. When used in constructing forecasting models the resulting prediction corresponds to the geometric mean (Tofallis, 2015).

antoinecarme commented 7 years ago

Reference article :

Tofallis, C (2015) "A Better Measure of Relative Prediction Accuracy for Model Selection and Model Estimation", Journal of the Operational Research Society, 66(8),1352-1362.

http://uhra.herts.ac.uk/bitstream/handle/2299/16654/A_Better_Measure_of_Relative_prediction_accuracy_for_model_selection_and_fitting_Preprint_JORS_.pdf?sequence=3

antoinecarme commented 7 years ago

Can be used through the option :

self.mModelSelection_Criterion = "LnQ";

antoinecarme commented 3 years ago

from

http://uhra.herts.ac.uk/bitstream/handle/2299/16654/A_Better_Measure_of_Relative_prediction_accuracy_for_model_selection_and_fitting_Preprint_JORS_.pdf?sequence=3

image

antoinecarme commented 3 years ago

Also :

http://uhra.herts.ac.uk/bitstream/handle/2299/16654/A_Better_Measure_of_Relative_prediction_accuracy_for_model_selection_and_fitting_Preprint_JORS_.pdf?sequence=3

image

antoinecarme commented 3 years ago

L. Tornqvist, P. Vartia and Y. O. Vartia (1985), How Should Relative Changes Be Measured? The American Statistician, 39, 43-46 http://www.jstor.org/stable/2683905

antoinecarme commented 3 years ago

https://stats.stackexchange.com/questions/154918/calculating-percentage-difference-between-maximum-and-current-value

antoinecarme commented 3 years ago

Performance Metrics (Error Measures) in Machine Learning Regression, Forecasting and Prognostics: Properties and Typology Alexei Botchkarev

https://arxiv.org/abs/1809.03006

Botchkarev, A. (2019) A new typology design of performance metrics to measure errors in machine learning regression algorithms. Interdisciplinary Journal of Information, Knowledge, and Management, 14, 45-79.

https://doi.org/10.28945/4184 https://www.gsrc.ca/metrics_typology2019.pdf

antoinecarme commented 3 years ago

Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International journal of forecasting, 22(4), 679-688. https://doi.org/10.1016/j.ijforecast.2006.03.001

antoinecarme commented 3 years ago

Provided that predicted and actual values are strictly positive :

LnQ_i = ln(predicted_i / actual_i) = ln(predicted_i) – ln(actual_i)

LnQ = sum_i {LnQ_i ^ 2}
antoinecarme commented 3 years ago

Ozone model (model selection based on LnQ) :

image

antoinecarme commented 3 years ago

Air Passengers model (model selection based on LnQ):

image

antoinecarme commented 3 years ago

Closing