The ML.ARIMA_EVALUATE function

This document describes theML.ARIMA_EVALUATE function, which you can useto evaluate the model metrics ofARIMA_PLUS orARIMA_PLUS_XREG time seriesmodels.

Syntax

ML.ARIMA_EVALUATE(  MODEL `PROJECT_ID.DATASET.MODEL_NAME`,  [, STRUCT(SHOW_ALL_CANDIDATE_MODELS AS show_all_candidate_models)])
Note: No input data is required.

Arguments

ML.ARIMA_EVALUATE takes the following arguments:

Output

ML.ARIMA_EVALUATE returns the following columns:

  • time_series_id_col ortime_series_id_cols: the identifiers of a timeseries. Only present when forecasting multiple time series at once. The columnnames and types are inherited from theTIME_SERIES_ID_COL optionas specified in the model creation query.
  • non_seasonal_p: anINT64 value that contains the order of theautoregressive part in a non-seasonal ARIMA model.
  • non_seasonal_d: anINT64 value that contains the degree of firstdifferencing involved in a non-seasonal ARIMA model.
  • non_seasonal_q: anINT64 value that contains the order of the movingaverage part in a non-seasonal ARIMA model.
  • has_drift: aBOOL value that indicates whether the model has drift.
  • log_likelihood: aFLOAT64 value that contains thelog-likelihood of the model.
  • AIC: the AIC of the model.
  • variance: aFLOAT64 value that contains the variance of the model.
  • seasonal_periods: anARRAY<STRING> value that contains one or more ofthe following values:

    • DAILY
    • WEEKLY
    • MONTHLY
    • QUARTERLY
    • YEARLY
    • NO_SEASONALITY
  • has_holiday_effect: aBOOL value that indicates whether the history datahas a holiday effect.

  • has_spikes_and_dips: aBOOL value that indicates whether the history datahas spikes and dips.

  • has_step_changes: aBOOL value that indicates whether the model hasstep changes.

  • error_message: aSTRING value that contains the error message raised ifany time series fail in the model.

Thehas_holiday_effect,has_spikes_and_dips, andhas_step_changes columnsare only populated forARIMA_PLUS models that havedecompose_time_seriesenabled.

All of the columns are specific to the fittedARIMA models except for thefollowing columns:

  • time_series_id_col
  • time_series_id_cols
  • seasonal_periods
  • has_holiday_effect
  • has_spikes_and_dips
  • has_step_changes

When thenon_seasonal_d value is not1,has_drift is set toFALSE bydefault, becausehas_drift doesn't apply in those cases.

Example

The following example retrieves the evaluation metrics of the best model fromthe modelmydataset.mymodel in your default project:

SELECT*FROMML.ARIMA_EVALUATE(MODEL`mydataset.mymodel`,STRUCT(FALSEASshow_all_candidate_models))

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.