Skip to content

fix: preserve AutoTheta configuration across forecast paths - #1240

Open
Dresden (DresdenGman) wants to merge 1 commit into
Nixtla:mainfrom
DresdenGman:fix/autotheta-preserve-configuration
Open

Dresden (DresdenGman) wants to merge 1 commit into
Nixtla:mainfrom
DresdenGman:fix/autotheta-preserve-configuration

Conversation

@DresdenGman

Copy link
Copy Markdown
Contributor

Summary

  • preserve the configured error distribution in AutoTheta.forecast
  • preserve the fitted error distribution and seasonal decomposition type in forward_theta
  • add regression coverage across normal and non-normal distributions and additive/multiplicative decomposition

Problem

The regular fit path passes both distribution and decomposition_type into auto_theta, but two equivalent call paths dropped part of that configuration:

  • the memory-efficient forecast path omitted distribution, silently reverting non-normal models to normal errors
  • forward_theta omitted both values, silently reverting the fitted model to normal errors and multiplicative decomposition

As a result, equivalent public APIs could return materially different point forecasts and prediction intervals. On current main, the regression cases in this PR differed by as much as 39.80 across forecast outputs for non-normal distributions and 337.41 across forward outputs for additive decomposition. With the fix, every tested path agrees exactly.

Validation

  • 104 passed across TestTheta, tests/test_theta.py, and tests/test_distributions.py
  • regression coverage for normal, Laplace, Student-t, skew-normal, and GED forecast paths
  • forward-path coverage for normal/Laplace errors and multiplicative/additive decomposition
  • Ruff lint passes for every changed file
  • diff whitespace validation passes

This is a focused follow-up to the distribution support introduced in #1116.

@codspeed

codspeed Bot commented Sep 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 38 untouched benchmarks


Comparing DresdenGman:fix/autotheta-preserve-configuration (19a689a) with main (99f2408)

Open in CodSpeed

This branch has not been deployed

No deployments
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