Google Professional Machine Learning Engineer Question 8
Single answerGoogle Cloud PlatformYour company wants to build a machine learning model using BigQuery ML to predict whether a customer will purchase a product (yes or no) based on their past behavior and demographic data. After analyzing the dataset, you find that the target variable ‘purchase’ is binary (0 or 1). Which BigQuery ML model type should you use to achieve this?
- A
LINEAR_REG
- B
LOGISTIC_REG
- C
KMEANS
- D
MATRIX_FACTORIZATION
Show answer and explanation
Correct answer: B
Explanation
The LOGISTIC_REG model in BigQuery ML is specifically designed for binary classification tasks where the target variable has two possible values (e.g., 0 or 1). Since the task described involves predicting a binary outcome ('yes' or 'no'), LOGISTIC_REG is the appropriate model type. Other options, such as LINEAR_REG, KMEANS, and MATRIX_FACTORIZATION, are designed for different use cases and would not be suitable for this scenario.
- A. Incorrect.
LINEAR_REG is used for regression problems where the target variable is continuous, not binary or categorical, so it is not suitable for this use case.
- B. Correct.
LOGISTIC_REG is the correct choice for binary classification problems like this one, where the target variable is binary (0 or 1).
- C. Incorrect.
KMEANS is used for clustering tasks, where the goal is to group similar data points together, not for classification tasks like predicting a binary outcome.
- D. Incorrect.
MATRIX_FACTORIZATION is typically used for recommendation systems, such as predicting user preferences, and is not suitable for binary classification.