Skip to content

AutoARIMAForecaster

yohou_nixtla.stats.AutoARIMAForecaster

Bases: BaseStatsForecaster

AutoARIMA forecaster via statsforecast.

Automatically selects the best ARIMA model using the Hyndman-Khandakar algorithm.

Parameters

Name Type Description Default
season_length int

Length of the seasonal period.

1
d int or None

Order of first differencing. Auto-detected if None.

None
D int or None

Order of seasonal differencing. Auto-detected if None.

None
max_p int

Maximum non-seasonal AR order.

5
max_q int

Maximum non-seasonal MA order.

5
freq str or None

Frequency string. Auto-inferred from data if None.

None
feature_transformer BaseTransformer or None

Transformer applied to exogenous features before fitting/predicting.

None
target_transformer BaseTransformer or None

Transformer applied to the target before fitting. Inverse-transformed after predicting to return forecasts in the original scale.

None
target_as_feature ('transformed', 'raw')

Whether to include target values as additional features.

"transformed"
**params dict

Additional parameters forwarded to statsforecast.models.AutoARIMA.

{}

Attributes

Name Type Description
nixtla_forecaster_ StatsForecast

The fitted Nixtla orchestrator.

instance_ AutoARIMA

The constructed AutoARIMA model instance.

See Also

ARIMAForecaster : ARIMA with manually specified orders. AutoETSForecaster : Automatic ETS model selection.

Examples

>>> from yohou_nixtla.stats import AutoARIMAForecaster
>>> forecaster = AutoARIMAForecaster(season_length=12)
>>> forecaster
AutoARIMAForecaster(...)

Source Code

Show/Hide source
class AutoARIMAForecaster(BaseStatsForecaster):
    """AutoARIMA forecaster via statsforecast.

    Automatically selects the best ARIMA model using the Hyndman-Khandakar
    algorithm.

    Parameters
    ----------
    season_length : int, default=1
        Length of the seasonal period.
    d : int or None, default=None
        Order of first differencing. Auto-detected if None.
    D : int or None, default=None
        Order of seasonal differencing. Auto-detected if None.
    max_p : int, default=5
        Maximum non-seasonal AR order.
    max_q : int, default=5
        Maximum non-seasonal MA order.
    freq : str or None, default=None
        Frequency string. Auto-inferred from data if None.
    feature_transformer : BaseTransformer or None, default=None
        Transformer applied to exogenous features before fitting/predicting.
    target_transformer : BaseTransformer or None, default=None
        Transformer applied to the target before fitting. Inverse-transformed
        after predicting to return forecasts in the original scale.
    target_as_feature : {"transformed", "raw"} or None, default=None
        Whether to include target values as additional features.
    **params : dict
        Additional parameters forwarded to ``statsforecast.models.AutoARIMA``.

    Attributes
    ----------
    nixtla_forecaster_ : StatsForecast
        The fitted Nixtla orchestrator.
    instance_ : AutoARIMA
        The constructed AutoARIMA model instance.

    See Also
    --------
    ARIMAForecaster : ARIMA with manually specified orders.
    AutoETSForecaster : Automatic ETS model selection.

    Examples
    --------
    >>> from yohou_nixtla.stats import AutoARIMAForecaster
    >>> forecaster = AutoARIMAForecaster(season_length=12)
    >>> forecaster  # doctest: +ELLIPSIS
    AutoARIMAForecaster(...)

    """

    _estimator_default_class = AutoARIMA

    _tags = {"requires_exogenous": True, "supports_exogenous": True}

Tutorials

The following example notebooks use this component:

  • How to Compare Forecasters


    Fit multiple statistical forecasters on the same dataset and evaluate their accuracy with MAE.

    View · Open in marimo