Skip to content

hotfix: Damped ETS - #1219

Draft
MMenchero wants to merge 3 commits into
mainfrom
hotfix/damped-ets
Draft

hotfix: Damped ETS #1219
MMenchero wants to merge 3 commits into
mainfrom
hotfix/damped-ets

Conversation

@MMenchero

@MMenchero MMenchero commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

This fixes the damped-trend forecast recursion in ETS models.

For a damped additive trend, the correct trend coefficient at horizon $h$ is

$$ \phi + \phi^2 + \cdots + \phi^h. $$

Since i starts at zero, changing pow(phi, i + 1) to pow(phi, i + 2) after horizon 1 produces the correct horizon-2 coefficient, $\phi + \phi^2$, instead of the incorrect $2\phi$.

The shared recursion also affects damped multiplicative trends.

The fable equivalent script uses pow(phi, i+2). See https://github.com/tidyverts/fable/blob/3fe8346a5506ba3f262f365de9b0d293e217f2bc/src/etscalc.c#L236

@MMenchero
MMenchero marked this pull request as draft August 27, 2026 00:51
@codspeed-hq

codspeed-hq Bot commented Aug 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 38 untouched benchmarks


Comparing hotfix/damped-ets (2fe73d7) with main (a580cf9)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant