Skip to Content
Data StudioBQML Models

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 TypeCategoryUse Cases
Logistic RegressionClassificationPurchase propensity, churn prediction, conversion likelihood
Linear RegressionContinuous predictionCustomer lifetime value (LTV), revenue forecasting
K-Means ClusteringUnsupervised segmentationDiscover natural customer groups, behavioral clustering

Creating a BQML Model

  1. Open Data → Transformations and click New Data Model.
  2. Select BigQuery ML (BQML) from the approach picker.
  3. Choose a model type (Logistic Regression, Linear Regression, or K-Means Clustering).
  4. Select properties from calculated properties. These are pre-computed behavioral metrics like order_count, days_since_last_order, total_revenue, and others.
  5. 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).
  6. Save and start training.

Training

Training runs as a BigQuery ML job inside your warehouse. You can monitor progress from the model detail page.

StatusDescription
PendingThe model has been created and is queued for training.
TrainingBigQuery is actively training the model.
CompletedTraining finished successfully. Results and metrics are available.
FailedTraining 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 Retrain

To 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)

MetricDescription
AccuracyPercentage of correct predictions
PrecisionProportion of positive predictions that are correct
RecallProportion of actual positives that are correctly identified
F1 ScoreHarmonic mean of precision and recall
ROC AUCArea under the receiver operating characteristic curve
Log LossLogarithmic 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)

MetricDescription
MAEMean absolute error
MSEMean squared error
RMSERoot mean squared error
R-squaredProportion 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:

  1. Open the completed classification model.
  2. Click Connect to VBB.
  3. Select the destination ad platform and configure value mapping.
  4. 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:

DetailDescription
Cluster countThe number of clusters (as configured)
Cluster sizesNumber of users in each cluster
Top defining featuresThe features that most distinguish each cluster from others
Davies-Bouldin indexA 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.


  • 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
Last updated on