Skip to content

Conversation

@Lucky-Lodhi2004
Copy link

Reference Issues/PRs

Fixes #3078

####Updated Files

  • aeon/forecasting/stats/_arima.py

What does this implement/fix? Explain your changes.

Quoting @JoaquinAmatRodrigo

The current implementation of aeon.forecasting.stats.ARIMA.iterative_forecast includes fitting the forecaster as its first step.
If the ARIMA model has already been fitted, this additional fit step is unnecessary. All the required information for subsequent predictions is already stored in the fitted model.

For resolving this issue, I have not added any module or method but just edited aeon/forecasting/stats/_arima.py . I have made following changes in iterative_forecast method of ARIMA class (line 210 of _arima.py).

def iterative_forecast(self, y, prediction_horizon, fit=True):
        if fit:
            self.fit(y)
        elif not self.is_fitted:
            raise ValueError(
                "Model must be fitted before calling iterative_forecast with fit=False."
            )

I added extra parameter 'fit' into the method iterative__forecast(). iterative_forecast will raise error if model isn't fitted before, and fitting can be set as true or false.

Does your contribution introduce a new dependency? If yes, which one?

No, my contribution does not introduce any new dependency

Any other comments?

I ran pytest on whole codebase and everything seems fine.

PR checklist

For all contributions
  • I've added myself to the list of contributors. Alternatively, you can use the @all-contributors bot to do this for you after the PR has been merged.
  • The PR title starts with either [ENH], [MNT], [DOC], [BUG], [REF], [DEP] or [GOV] indicating whether the PR topic is related to enhancement, maintenance, documentation, bugs, refactoring, deprecation or governance.

@aeon-actions-bot aeon-actions-bot bot added enhancement New feature, improvement request or other non-bug code enhancement forecasting Forecasting package labels Nov 16, 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

@alexbanwell1 alexbanwell1 self-requested a review November 18, 2025 00:47
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] Make fit in ARIMA iterative_forecast optional

2 participants