in Python2 with NumPy and scipy.signal . This is a good bad example, in that yhat[n] == x[n], i.e. predict next == current (a = 1, b = 0) is ~ optimal.
The files:
holt.py:
ab_BA: a, b -> polynomial coefs B, A
predict( ab, x ) -> y, predicts x[t+1]
predict_err( ab, x )
test-holt-ecg.py: runs holt.py on ecg
ecg.py: synthetic ECG data
holt-.9-.01.log
Holt-Winters smoothing -- nice and clear
Double exponential smoothing
absolute vs. relative error
1-step, 2-step ... prediction
cheers
-- denis