bigframes.bigquery.ml.forecast#

bigframes.bigquery.ml.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 with a BigQuery ML time series model.

See the BigQuery ML FORECAST function syntax for additional reference.

Parameters:
  • model (bigframes.ml.base.BaseEstimator, str, or pd.Series) – The time series model, such as an ARIMA_PLUS or ARIMA_PLUS_XREG model, to use for forecasting.

  • input (Union[bigframes.pandas.DataFrame, str], optional) – The DataFrame or query that contains the future feature values used by an ARIMA_PLUS_XREG model. ARIMA_PLUS models 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 horizon option specified in the CREATE MODEL statement, 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 forecasted time series values.

Return type:

bigframes.pandas.DataFrame