bigframes.bigquery.ml.explain_forecast#
- bigframes.bigquery.ml.explain_forecast(model: BaseEstimator | str | Series, input_: DataFrame | DataFrame | str | None = None, *, horizon: int | None = None, confidence_level: float | None = None) DataFrame[source]#
Forecasts future time series values and explains them with the separate components that make up the time series.
See the BigQuery ML EXPLAIN_FORECAST function syntax for additional reference.
- Parameters:
model (bigframes.ml.base.BaseEstimator, str, or pd.Series) – The time series model to explain. Must be an
ARIMA_PLUSmodel trained with thedecompose_time_seriesoption enabled, which is the default, or anARIMA_PLUS_XREGmodel.input (Union[bigframes.pandas.DataFrame, str], optional) – The DataFrame or query that contains the future feature values used by an
ARIMA_PLUS_XREGmodel.ARIMA_PLUSmodels don’t take input data, because forecasting happens when the model is created.horizon (int, optional) – An INT64 value that specifies the number of time points to forecast. The default value is 3, and the maximum value is the value of the
horizonoption specified in theCREATE MODELstatement, or 1000 if that option isn’t specified.confidence_level (float, optional) – A FLOAT64 value that specifies the percentage of the future values that fall in the prediction interval. The default value is 0.95. The valid input range is [0, 1).
- Returns:
The history and forecast time series values, along with the trend, seasonal, holiday, and other components that explain them.
- Return type: