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_col
ortime_series_id_cols
: a value that contains the identifiers of a time series.time_series_id_col
can be anINT64
orSTRING
value.time_series_id_cols
can be anARRAY<INT64>
orARRAY<STRING>
value. Only present when forecasting multiple time series simultaneously. The column names and types are inherited from theTIME_SERIES_ID_COL
option as specified in the model creation query.ar_coefficients
: anARRAY<FLOAT64>
value that contains the autoregressive coefficients, which corresponds to non-seasonal p.ma_coefficients
: anARRAY<FLOAT64>
value that contains the moving-average coefficients, which corresponds to non-seasonal q.intercept_or_drift
: aFLOAT64
value that contains the constant term of the ARIMA model. By definition, the constant term is calledintercept
when non-seasonal d is0
, anddrift
when non-seasonal d is1
.intercept_or_drift
is always0
when non-seasonal d is2
.processed_input
: aSTRING
value that contains the name of the model feature input column. The value of this column matches the name of the feature column provided in thequery_statement
clause that was used when the model was trained.weight
: when theprocessed_input
value is numerical,weight
contains aFLOAT64
value and thecategory_weights
column containsNULL
values. When theprocessed_input
value is non-numerical and has been converted to dummy encoding, theweight
column isNULL
and thecategory_weights
column contains the category names and weights for each category.category_weights.category
: aSTRING
value that contains the category name if theprocessed_input
value is non-numeric.category_weights.weight
: aFLOAT64
that contains the category's weight if theprocessed_input
value 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 information about the supported SQL statements and functions for each model type, see End-to-end user journey for each model.