Skip to content

[ENH] Make fit in ARIMA iterative_forecast optional #3078

@JoaquinAmatRodrigo

Description

@JoaquinAmatRodrigo

Describe the feature or idea you want to propose

Hi,

First, thank you for the great work on implementing a Python-native and efficient version of ARIMA.

The current implementation of aeon.forecasting.stats.ARIMA.iterative_forecast includes fitting the forecaster as its first step:

def iterative_forecast(self, y, prediction_horizon):

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.

An option to skip this initial fit will speed up the iterative forecast when the model is already fitted.

Describe your proposed solution

A possible solution would be to include an optional argument (e.g., fit=True) in iterative_forecast.

  • If fit=True, the method behaves as it currently does.
  • If fit=False, the method skips the redundant fitting step and uses the already-fitted model directly.
def iterative_forecast(self, y, prediction_horizon, fit=True):
    if fit:
        self.fit(y)

Describe alternatives you've considered, if relevant

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature, improvement request or other non-bug code enhancementforecastingForecasting package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions