_SARIMAXBaseAdapter¶
- class _SARIMAXBaseAdapter[source]¶
Bases:
etna.models.base.BaseAdapter
Base class for adapters based on
statsmodels.tsa.statespace.sarimax.SARIMAX
.- 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 [source]¶
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 [source]¶
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 [source]¶
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 [source]¶
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 [source]¶
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