BQML Models
BQML Models let you train machine learning models directly inside your BigQuery warehouse using calculated properties from Data Studio. No data leaves your project, and training runs as a standard BigQuery job.
Overview
You select features, pick a model type, and Vendo handles the rest: generating the CREATE MODEL statement, executing it in BigQuery, tracking training status, and surfacing evaluation metrics when training completes. Trained models can feed downstream workflows like Value-Based Bidding and segment creation.
Model Types
Vendo supports three BigQuery ML model types:
| Model Type | Category | Use Cases |
|---|---|---|
| Logistic Regression | Classification | Purchase propensity, churn prediction, conversion likelihood |
| Linear Regression | Continuous prediction | Customer lifetime value (LTV), revenue forecasting |
| K-Means Clustering | Unsupervised segmentation | Discover natural customer groups, behavioral clustering |
Creating a BQML Model
- Open Data → Transformations and click New Data Model.
- Select BigQuery ML (BQML) from the approach picker.
- Choose a model type (Logistic Regression, Linear Regression, or K-Means Clustering).
- Select properties from calculated properties. These are pre-computed behavioral metrics like
order_count,days_since_last_order,total_revenue, and others. - Configure parameters specific to the chosen model type:
- Classification / Regression: select the target label column, set train/test split ratio.
- K-Means: choose the number of clusters (2—10).
- Save and start training.
Training
Training runs as a BigQuery ML job inside your warehouse. You can monitor progress from the model detail page.
| Status | Description |
|---|---|
| Pending | The model has been created and is queued for training. |
| Training | BigQuery is actively training the model. |
| Completed | Training finished successfully. Results and metrics are available. |
| Failed | Training encountered an error. Check the error message for details. |
Training time depends on dataset size and model complexity. Most models on typical e-commerce datasets complete within a few minutes.
Automated Retraining via Pipeline
BQML models can be connected to the pipeline DAG as downstream nodes. When calculated property transformations finish computing, they automatically signal the BQML model to retrain with the latest data:
Source Import --> Property Compute --> BQML Model RetrainTo set this up, add a pipeline edge from your property compute node to your BQML model node in the Pipelines view.
Results & Evaluation
Once training completes, the model detail page displays evaluation metrics and visualizations.
Classification Models (Logistic Regression)
| Metric | Description |
|---|---|
| Accuracy | Percentage of correct predictions |
| Precision | Proportion of positive predictions that are correct |
| Recall | Proportion of actual positives that are correctly identified |
| F1 Score | Harmonic mean of precision and recall |
| ROC AUC | Area under the receiver operating characteristic curve |
| Log Loss | Logarithmic loss measuring prediction confidence |
Classification results also include:
- Feature importance ranking showing which features contributed most to predictions.
- Decile distribution breaking predicted scores into ten equal groups, so you can see how well the model separates high-probability from low-probability users.
Regression Models (Linear Regression)
| Metric | Description |
|---|---|
| MAE | Mean absolute error |
| MSE | Mean squared error |
| RMSE | Root mean squared error |
| R-squared | Proportion of variance explained by the model |
Regression results include feature importance ranking.
Clustering Models (K-Means)
K-Means results are covered in the dedicated section below.
Value-Based Bidding
Classification models (Logistic Regression) can be connected to Vendo’s Value-Based Bidding (VBB) workflow. VBB uses the model’s predicted scores to assign conversion values, which are then sent to ad platforms so their bidding algorithms can optimize for your highest-value users.
To connect a model to VBB:
- Open the completed classification model.
- Click Connect to VBB.
- Select the destination ad platform and configure value mapping.
- Vendo generates per-user conversion values from the model scores and syncs them on each export cycle.
See Value-Based Bidding for more on the VBB workflow.
K-Means Clustering
K-Means models discover natural groupings in your customer data without requiring a target label. This is useful for understanding behavioral segments that you may not have defined manually.
Cluster Results
After training, the model detail page shows:
| Detail | Description |
|---|---|
| Cluster count | The number of clusters (as configured) |
| Cluster sizes | Number of users in each cluster |
| Top defining features | The features that most distinguish each cluster from others |
| Davies-Bouldin index | A measure of cluster separation (lower is better) |
Visualizations
K-Means results include two chart types:
- Radar chart showing the normalized feature values for each cluster, so you can quickly compare cluster characteristics side by side.
- Trend charts showing how cluster membership and feature distributions change over time when the model is retrained.
Converting Clusters to Segments
Any cluster discovered by a K-Means model can be converted into a rule-based segment with one click. See Auto-Segmentation for the guided workflow that wraps this process.
Related
- Customer 360 — calculated properties used by BQML models
- Segments — Rule-based segments that can be created from cluster results
- Auto-Segmentation — Guided K-Means clustering workflow
- SQL Models — Pre-process data before training