Predicting with BigQuery ML

45 minutes
  • 4 Learning Objectives

About this Hands-on Lab

Machine learning is an amazingly powerful tool — and a tool that should be available to as many practitioners as possible. BigQuery ML puts the power of machine learning into the hands of SQL users. In this hands-on lab, you’ll use BigQuery ML to create, evaluate, and predict the likelihood that a visitor to a particular site will make a transaction, all based on a public dataset.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create the BigQuery Dataset

Create the dataset in BigQuery.

Create and Train the ML Model

Run a SQL function to create and train a logistic regression model.

Evaluate the ML Model

Evaluate the predicted values against the current data via SQL.

Predict Using the ML Model

Use BigQuery ML SQL to predict the number of transactions for various countries.

Additional Resources

A company-wide effort is underway to more effectively foresee business trends in the upcoming quarter across various regions. You’ve decided to pitch in by using BigQuery ML to predict the possibility that previous site visitors from targeted countries will complete a transaction in the future.

In your SQL queries, use the following Google Analytics public dataset:


What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?