_AutoARIMAAdapter¶
- class _AutoARIMAAdapter(**kwargs)[source]¶
Bases:
etna.models.sarimax._SARIMAXBaseAdapter
Class for holding auto arima model.
Notes
We use auto ARIMA [1] model from pmdarima package.
Init auto ARIMA model with given params.
- Parameters
**kwargs – Training parameters for auto_arima from pmdarima package.
- Inherited-members
Methods
fit
(df, regressors)Fits a SARIMAX model.
forecast
(df, prediction_interval, quantiles)Compute autoregressive predictions from a SARIMAX model.
Estimate forecast components.
Get
statsmodels.tsa.statespace.sarimax.SARIMAXResultsWrapper
that is used inside etna class.predict
(df, prediction_interval, quantiles)Compute predictions from a SARIMAX model and use true in-sample data as lags if possible.
Estimate prediction components.
- fit(df: pandas.core.frame.DataFrame, regressors: List[str]) etna.models.sarimax._SARIMAXBaseAdapter ¶
Fits a SARIMAX model.
- Parameters
df (pandas.core.frame.DataFrame) – Features dataframe
regressors (List[str]) – List of the columns with regressors
- Returns
Fitted model
- Return type
- forecast(df: pandas.core.frame.DataFrame, prediction_interval: bool, quantiles: Sequence[float]) pandas.core.frame.DataFrame ¶
Compute autoregressive predictions from a SARIMAX model.
- Parameters
df (pandas.core.frame.DataFrame) – Features dataframe
prediction_interval (bool) – If True returns prediction interval for forecast
quantiles (Sequence[float]) – Levels of prediction distribution
- Returns
DataFrame with predictions
- Return type
pandas.core.frame.DataFrame
- forecast_components(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame ¶
Estimate forecast components.
- Parameters
df (pandas.core.frame.DataFrame) – features dataframe
- Returns
dataframe with forecast components
- Return type
pandas.core.frame.DataFrame
- get_model() statsmodels.tsa.statespace.sarimax.SARIMAXResultsWrapper ¶
Get
statsmodels.tsa.statespace.sarimax.SARIMAXResultsWrapper
that is used inside etna class.- Returns
Internal model
- Return type
statsmodels.tsa.statespace.sarimax.SARIMAXResultsWrapper
- predict(df: pandas.core.frame.DataFrame, prediction_interval: bool, quantiles: Sequence[float]) pandas.core.frame.DataFrame ¶
Compute predictions from a SARIMAX model and use true in-sample data as lags if possible.
- Parameters
df (pandas.core.frame.DataFrame) – Features dataframe
prediction_interval (bool) – If True returns prediction interval for forecast
quantiles (Sequence[float]) – Levels of prediction distribution
- Returns
DataFrame with predictions
- Return type
pandas.core.frame.DataFrame
- predict_components(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame ¶
Estimate prediction components.
- Parameters
df (pandas.core.frame.DataFrame) – features dataframe
- Returns
dataframe with prediction components
- Return type
pandas.core.frame.DataFrame