Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions aeon/forecasting/stats/_arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,13 @@ def _forecast(self, y, exog=None):
self._fit(y, exog)
return float(self.forecast_)

def iterative_forecast(self, y, prediction_horizon):
self.fit(y)
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."
)
n = len(self._differenced_series)
p, q = self.p, self.q
phi, theta = self.phi_, self.theta_
Expand Down