End-to-end user journey for each model
BigQuery ML supports a variety of machine learning models and a complete machine learning flow for each model, such as feature preprocessing, model creation, hyperparameter tuning, inference, evaluation, and model export. The machine learning flow for the models are split into the following two tables:
Model creation phase
Model category | Model types | Model creation | Feature preprocessing | Hyperparameter tuning | Model weights | Feature & training info | Tutorials |
---|---|---|---|---|---|---|---|
Supervised learning | Linear & logistic regression | create model | Automatic preprocessing, Manual preprocessing1 |
HP tuning2 ml.trial_info |
ml.weights | ml.feature_info ml.training_info |
|
Deep neural networks (DNN) | create model | N/A5 | N/A | ||||
Wide & Deep networks | create model | N/A5 | N/A | ||||
Boosted trees | create model | N/A5 | N/A | ||||
Random forest | create model | N/A5 | N/A | ||||
AutoML classification & regression | create model | N/A3 | N/A3 | N/A5 | N/A | ||
Unsupervised learning | K-means | create model | Automatic preprocessing, Manual preprocessing1 |
HP tuning2 ml.trial_info |
ml.centroids | ml.feature_info ml.training_info |
cluster bike stations |
Matrix factorization | create model | N/A | HP tuning2 ml.trial_info |
ml.weights | |||
Principal component analysis (PCA) | create model | Automatic preprocessing, Manual preprocessing1 |
N/A | ml.principal_ components, ml.principal_ component_info |
N/A | ||
Autoencoder | create model | Automatic preprocessing, Manual preprocessing1 |
HP tuning2 ml.trial_info |
N/A5 | N/A | ||
Time series models | ARIMA_PLUS | create model | Automatic preprocessing | auto.ARIMA4 | ml.arima_ coefficients | ml.feature_info ml.training_info |
|
ARIMA_PLUS_XREG | create model | Automatic preprocessing | auto.ARIMA4 | ml.arima_ coefficients | ml.feature_info ml.training_info |
forecast a single time series | |
Generative AI remote models | Remote model over a Vertex AI text generation model6 | create model | N/A | N/A | N/A | N/A | |
Remote model over a Vertex AI embedding generation model6 | create model | N/A | N/A | N/A | N/A | ||
AI remote models | Remote model over the Cloud Vision API | create model | N/A | N/A | N/A | N/A | N/A |
Remote model over the Cloud Translation API | create model | N/A | N/A | N/A | N/A | N/A | |
Remote model over the Cloud Natural Language API | create model | N/A | N/A | N/A | N/A | N/A | |
Remote model over the Document AI API | create model | N/A | N/A | N/A | N/A | N/A | |
Remote model over the Speech-to-Text API |
create model | N/A | N/A | N/A | N/A | N/A | |
Remote models | Remote model with a Vertex AI endpoint | create model | N/A | N/A | N/A | N/A | predict with remote model |
Imported models | TensorFlow | create model | N/A | N/A | N/A | N/A | predict with imported TensorFlow model |
TensorFlow Lite | create model | N/A | N/A | N/A | N/A | N/A | |
Open Neural Network Exchange (ONNX) | create model | N/A | N/A | N/A | N/A | ||
XGBoost | create model | N/A | N/A | N/A | N/A | N/A | |
Transform-only models7 | Transform-only | create model | Manual preprocessing1 | N/A | N/A | ml.feature_info | N/A |
Contribution analysis models | Contribution analysis (Preview) |
create model | Manual preprocessing | N/A | N/A | N/A | Get data insights from a contribution analysis model |
1See TRANSFORM clause for the feature engineering tutorial. For more information about the preprocessing functions, see the BQML - Feature Engineering Functions tutorial.
2See use hyperparameter tuning to improve model performance tutorial.
3Automatic feature engineering and hyperparameter tuning are embedded in the AutoML model training by default.
4The auto.ARIMA algorithm performs hyperparameter tuning for the trend module. Hyperparameter tuning is not supported for the entire modeling pipeline. See the modeling pipeline for more details.
5BigQuery ML doesn't support functions that retrieve the weights for boosted trees, random forest, DNNs, Wide-and-deep, Autoencoder, or AutoML models. To see the weights of those models, you can export an existing model from BigQuery ML to Cloud Storage and then use the XGBoost library or the TensorFlow library to visualize the tree structure for the tree models or the graph structure for the neural networks. For more information, see the EXPORT MODEL documentation and the EXPORT MODEL tutorial.
6Uses a Vertex AI foundation model or customizes it by using supervised tuning.
7This is not a typical ML model but rather an artifact that transforms raw data into features.
Model use phase
1ml.confusion_matrix
is only applicable to classification models.
2ml.roc_curve
is only applicable to binary classification models.
3ml.explain_predict
is an extended version of ml.predict
.
For more information, see Explainable AI overview.
To learn how ml.explain_predict
is used, see regression tutorial and classification tutorial.
4For the difference between ml.global_explain
and
ml.feature_importance
, see
Explainable AI overview.
5See the Export a BigQuery ML model for online prediction tutorial. For more information about online serving, see the BQML - Create Model with Inline Transpose tutorial.
6For ARIMA_PLUS
or ARIMA_PLUS_XREG
models, ml.evaluate
can take new data as input to compute forecasting metrics such as mean absolute percentage error (MAPE). In the absence of new data, ml.evaluate
has an extended version ml.arima_evaluate
which outputs different evaluation information.
7ml.explain_forecast
is an extended version of ml.forecast
.
For more information, see Explainable AI overview.
To learn how ml.explain_forecast
is used, see the visualize results steps of the single time series forecasting and multiple time series forecasting tutorials.
8ml.advanced_weights
is an extended version of ml.weights
,
see ml.advanced_weights
for more details.
9Uses a Vertex AI foundation model or customizes it by using supervised tuning.
10This is not a typical ML model but rather an artifact that transforms raw data into features.
11Not supported for all Vertex AI LLMs. For more information, see ml.evaluate.