Professional Machine Learning Engineer free question 1 / 10 · Domain 1: Architecting low-code AI solutions
A team wants to predict from BigQuery contract history whether each customer will cancel next month. The analyst is fluent in SQL and also wants to read the coefficient of every feature. Which model is the most appropriate first choice?
- Train a BigQuery ML boosted tree classifier
- Train a BigQuery ML DNN classifier
- Train a BigQuery ML random forest classifier
- Train a BigQuery ML logistic regression model
Show the answer and explanation
Answer: D
Why this is correct
In a BigQuery ML generalized linear model, CREATE MODEL with MODEL_TYPE='LOGISTIC_REG' trains a logistic regression that handles classification, including a binary outcome such as whether a customer will buy. The whole job is plain SQL, and because the model is linear it keeps one weight per feature. If you train with CALCULATE_P_VALUES set to TRUE, you can later read each weight together with its p-value and standard error by calling the ML.ADVANCED_WEIGHTS function. That fits an SQL-fluent analyst who wants to check the coefficients.
Why the other options are wrong
"Train a BigQuery ML boosted tree classifier" … The BigQuery ML introduction describes boosted trees as XGBoost-based classification and regression models. They build predictions from many tree splits, so there is no single coefficient per feature to read.
"Train a BigQuery ML random forest classifier" … A random forest builds multiple decision trees during training and combines them for classification or regression. A feature's influence is spread across many splits and an aggregation step, so it does not appear as one coefficient per feature.
"Train a BigQuery ML DNN classifier" … A DNN model is a deep neural network built on TensorFlow for classification or regression. Its many hidden-layer weights cannot be read directly as one coefficient for each original feature.
Key point
The p-values and standard errors are computed when the model is created. If you want to look at them later with ML.ADVANCED_WEIGHTS, set CALCULATE_P_VALUES to TRUE before training (the default is FALSE).