QuestionQ13

Data Analysis and Presentation

Your retail company wants to predict customer churn from historical purchase data stored in BigQuery. The dataset contains customer demographics, purchase history, and a label showing whether each customer churned.

You want to build a machine learning model to identify customers at risk of churn. You need to create and train a logistic regression model to predict customer churn, using the customer_data table and the churned column as the target label. Which BigQuery ML query should you use?

Explanation

A BigQuery ML LOGISTIC_REG model performs classification using a label and input features. Naming churned as label identifies the target without INPUT_LABEL_COLS, while SELECT * EXCEPT(churned) retains the demographic and purchase-history columns as features and prevents the target from being used as a feature. Create an ML model in BigQuery ML by using SQL

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!