Skip to content

Conversation

@satwiksps
Copy link
Contributor

[ENH] Add prediction intervals to ARIMA iterative_forecast (#3100)

Reference Issues/PRs


What does this implement/fix?

This PR adds optional prediction interval support to the ARIMA.iterative_forecast method in aeon.forecasting.stats._arima.

Key features:

  • Adds a new optional parameter:
    alpha (default: None)
  • Backward compatible:
    • If alpha=None → returns the same np.ndarray as before.
    • If alpha is provided → returns a pandas.DataFrame with columns:
      • "mean" - point forecasts
      • "lower" - lower prediction interval
      • "upper" - upper prediction interval
  • Prediction intervals are computed using:
    • Empirical residual standard deviation
    • Normal quantiles via scipy.stats.norm.ppf
    • Standard error scaling with sqrt(horizon)

Additional updates:

  • AutoARIMA.iterative_forecast now forwards the alpha argument to the wrapped ARIMA model.
  • Added new unit tests covering prediction intervals.
  • All existing tests pass with no modification.

This enhancement provides users with basic forecast uncertainty estimates while keeping the ARIMA implementation lightweight and backward compatible.


Does this contribution introduce a new dependency?

No.
Uses existing NumPy, SciPy, and pandas packages already in the project.


Any other comments?

  • All pre-commit hooks pass (ruff, flake8, isort, black, etc.).
  • Tests pass locally, including new interval tests.
  • Changes are intentionally minimal to avoid regressions.

PR checklist

For all contributions
  • I've added myself to the list of contributors (after merge).
  • The PR title starts with [ENH].
For new estimators/functions
  • Not applicable - this PR modifies an existing estimator.
For developers with write access
  • Not applicable.

@aeon-actions-bot aeon-actions-bot bot added enhancement New feature, improvement request or other non-bug code enhancement forecasting Forecasting package labels Nov 15, 2025
@aeon-actions-bot
Copy link
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ enhancement ].
I have added the following labels to this PR based on the changes made: [ forecasting ]. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, any trivial fixes will automatically be pushed to your PR unless it is a draft.

Don't hesitate to ask questions on the aeon Slack channel if you have any.

PR CI actions

These checkboxes will add labels to enable/disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Stop automatic pre-commit fixes (always disabled for drafts)
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

@MatthewMiddlehurst
Copy link
Member

Hi, a fix for this has been merged.

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

Labels

enhancement New feature, improvement request or other non-bug code enhancement forecasting Forecasting package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] ARIMA prediction intervals

2 participants