← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / scientific-agent-skills / skills / aeon / references / forecasting.md

Time Series Forecasting

The aeon.forecasting module provides forecasters for univariate and multivariate series. In aeon 1.x, forecasting was rebuilt on array-native BaseForecaster estimators (replacing the old sktime-style fh API). The module is marked experimental — expect API evolution between releases.

Import paths (aeon 1.4+):

List all forecasters: aeon.utils.discovery.all_estimators(type_filter="forecaster").

Naive and Baseline Methods

Statistical Models

Deep Learning Forecasters

Requires aeon[all_extras] (PyTorch stack):

Regression-Based Forecasting

Quick Start

import numpy as np
from aeon.forecasting import NaiveForecaster
from aeon.forecasting.stats import ARIMA, AutoETS

y = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])

# Naive — horizon is a constructor argument; predict(y) forecasts from series y
naive = NaiveForecaster(strategy="last", horizon=3)
naive.fit(y)
pred_naive = naive.predict(y)

# ARIMA — one-step by default; multi-step via iterative_forecast
arima = ARIMA(p=1, d=1, q=1)
arima.fit(y)
pred_arima = arima.iterative_forecast(y, prediction_horizon=3)

# Auto model selection
auto_ets = AutoETS(horizon=3)
auto_ets.fit(y)
pred_ets = auto_ets.predict(y)

Forecasting Horizon

In aeon 1.x, set horizon on the estimator (number of steps ahead). predict(y) returns the forecast horizon steps beyond the end of y.

Multi-step strategies:

There is no ForecastingHorizon / fh=[1,2,3] API in aeon 1.x.

Model Selection

Evaluation Metrics

Use scikit-learn or standard numpy metrics on hold-out forecasts:

from sklearn.metrics import mean_absolute_error, mean_squared_error

mae = mean_absolute_error(y_true, y_pred)
mse = mean_squared_error(y_true, y_pred)

Exogenous Variables

Pass aligned exogenous arrays as exog (not X):

forecaster.fit(y_train, exog=exog_train)
y_pred = forecaster.predict(y_test, exog=exog_test)

Base Classes

Extend BaseForecaster for custom forecasters.