The ML.ARIMA_COEFFICIENTS function
This document describes the ML.ARIMA_COEFFICIENTS function, which lets you
see the ARIMA coefficients and the weights of the external regressors for
ARIMA_PLUS and ARIMA_PLUS_XREG time series models.
Syntax
ML.ARIMA_COEFFICIENTS( MODEL `PROJECT_ID.DATASET.MODEL` )
Arguments
ML.ARIMA_COEFFICIENTS takes the following arguments:
- PROJECT_ID: your project ID.
- DATASET: the BigQuery dataset that contains the model.
- MODEL: the name of the model.
Output
ML.ARIMA_COEFFICIENTS returns the following columns:
- time_series_id_color- time_series_id_cols: a value that contains the identifiers of a time series.- time_series_id_colcan be an- INT64or- STRINGvalue.- time_series_id_colscan be an- ARRAY<INT64>or- ARRAY<STRING>value. Only present when forecasting multiple time series simultaneously. The column names and types are inherited from the- TIME_SERIES_ID_COLoption as specified in the model creation query.
- ar_coefficients: an- ARRAY<FLOAT64>value that contains the autoregressive coefficients, which corresponds to non-seasonal p.
- ma_coefficients: an- ARRAY<FLOAT64>value that contains the moving-average coefficients, which corresponds to non-seasonal q.
- intercept_or_drift: a- FLOAT64value that contains the constant term of the ARIMA model. By definition, the constant term is called- interceptwhen non-seasonal d is- 0, and- driftwhen non-seasonal d is- 1.- intercept_or_driftis always- 0when non-seasonal d is- 2.
- processed_input: a- STRINGvalue that contains the name of the model feature input column. The value of this column matches the name of the feature column provided in the- query_statementclause that was used when the model was trained.
- weight: when the- processed_inputvalue is numerical,- weightcontains a- FLOAT64value and the- category_weightscolumn contains- NULLvalues. When the- processed_inputvalue is non-numerical and has been converted to dummy encoding, the- weightcolumn is- NULLand the- category_weightscolumn contains the category names and weights for each category.
- category_weights.category: a- STRINGvalue that contains the category name if the- processed_inputvalue is non-numeric.
- category_weights.weight: a- FLOAT64that contains the category's weight if the- processed_inputvalue is non-numeric.
Example
The following example retrieves the model coefficients information from
the model mydataset.mymodel in your default project:
SELECT * FROM ML.ARIMA_COEFFICIENTS(MODEL `mydataset.mymodel`)
What's next
- For information about model weights support in BigQuery ML, see BigQuery ML model weights overview.
- For more information about supported SQL statements and functions for time series forecasting models, see End-to-end user journeys for time series forecasting models.