jerrysjin / Exponential_Smoothing

A Simple C++ Template of Exponential Smoothing
http://shuojin.name/soft/exponential_smoothing.html
7 stars 2 forks source link

Error in double exponential smoothing formula #1

Open blackccpie opened 4 years ago

blackccpie commented 4 years ago

Hi,

I think there may be an error in your double exponential smoothing implementation here:

https://github.com/jerrysjin/Exponential_Smoothing/blob/6f6bdf6ac4aec165181899ac1b9154733205367c/exponential_smoothing.h#L345-L351

In the wiki page below, the correction term is computed after the smoothing term, which is not the case in your code:

https://en.wikipedia.org/wiki/Exponential_smoothing#Double_exponential_smoothing

Could you confirm the issue?

Thx

Albert

pha-nguyen commented 4 years ago

Hi @blackccpie did you confirm that? Which one is correct?

blackccpie commented 4 years ago

Hi @pha-nguyen, I guess my formulation is correct, but I still haven't had any confirmation from the author of this code.