ArimaModel
arima_model.ArimaModel
ARIMA model for univariate time series forecasting.
Supports both standard ARIMA(p, d, q) and seasonal ARIMA by specifying a seasonality period s. Implements traditional statsmodels ARIMA fitting, with future expandability to exogenous variables and rolling window forecasts.
__init__(self, params: Dict[str, Any], settings: Dict[str, Any])
(undocumented)
| Parameter | Type | Default | Description |
|---|---|---|---|
params |
Dict[str, Any] |
- | (undocumented) |
settings |
Dict[str, Any] |
- | (undocumented) |
train(self, y_context: np.ndarray, y_target: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs: dict) -> ArimaModel
Trains a separate ARIMA model for each variate in a (potentially multivariate) time series.
Expects y_context and y_target as 2D arrays: (num_steps, num_targets).
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | (undocumented) |
y_target |
np.ndarray |
- | (undocumented) |
timestamps_context |
np.ndarray |
- | (undocumented) |
timestamps_target |
np.ndarray |
- | (undocumented) |
x_context |
Optional[np.ndarray] |
None |
(undocumented) |
x_target |
Optional[np.ndarray] |
None |
(undocumented) |
**kwargs |
dict |
- | (undocumented) |
Returns: Self (the fitted forecaster; sets self.is_fitted).
predict(self, y_context: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs: dict) -> np.ndarray
Predicts future values for each variate and concatenates the results.
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | Context values, shape (num_steps, num_variates). |
timestamps_context |
np.ndarray |
- | Timestamps for context data. |
timestamps_target |
np.ndarray |
- | Timestamps for target/future data. |
x_context |
Optional[np.ndarray] |
None |
Optional covariate data for context. |
x_target |
Optional[np.ndarray] |
None |
Optional covariate data for prediction horizon. |
**kwargs |
dict |
- | Should include 'freq' key. |
Returns: np.ndarray (Predictions with shape (forecast_horizon, num_variates)).
Raises: ValueError (If the model has not been fitted.)