BigQuery ML model weights overview
This document describes how BigQuery ML supports model weightsdiscoverability for machine learning (ML) models.
An ML model is an artifact that is saved after running an ML algorithm ontraining data. The model represents the rules, numbers,and any other algorithm-specific data structures that are required to makepredictions. Some examples include the following:
- A linear regression model is comprised of a vector of coefficients that havespecific values.
- A decision tree model is comprised of one or more trees of if-thenstatements that have specific values.
- A deep neural network model is comprised of a graph structure with vectors ormatrixes of weights that have specific values.
In BigQuery ML, the termmodel weights is used to describe thecomponents that a model is comprised of.
Model weights offerings in BigQuery ML
BigQuery ML offers multiple functions that you can use toretrieve the model weights for different models.
| Model category | Model types | Model weights functions | What the function does |
|---|---|---|---|
| Supervised models | Linear & Logistic Regression | ML.WEIGHTS | Retrieves the feature coefficients and the intercept. |
| Unsupervised models | Kmeans | ML.CENTROIDS | Retrieves the feature coefficients for all of the centroids. |
| Matrix Factorization | ML.WEIGHTS | Retrieves the weights of all of the latent factors. They represent the two decomposed matrixes, the user matrix and the item matrix. | |
| PCA | ML.PRINCIPAL_COMPONENTS | Retrieves the feature coefficients for all principal components, also known as eigenvectors. | |
ML.PRINCIPAL_COMPONENT_INFO | Retrieves the statistics of each principal component, such as eigenvalue. | ||
| Time series models | ARIMA_PLUS | ML.ARIMA_COEFFICIENTS | Retrieves the coefficients of the ARIMA model, which is used to model the trend component of the input time series. For information about other components, such as seasonal patterns that are present in the time series, useML.ARIMA_EVALUATE. |
BigQuery ML doesn't support model weight functions for thefollowing types of models:
To see the weights of all of these model types except for AutoML Tablesmodels, export the model from BigQuery ML to Cloud Storage.You can then use the XGBoost library to visualize the tree structure forboosted tree and random forest models, or the TensorFlow libraryto visualize the graph structure for DNN and wide-and-deep models. There is nomethod for getting model weight information for AutoML Tables models.
For more information about exporting a model, seeEXPORT MODEL statementandExport a BigQuery ML model for online prediction.
What's next
For more information about supported SQL statements and functions for ML models,seeEnd-to-end user journeys for ML models.
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 2026-02-19 UTC.