Google Professional Machine Learning Engineer Question 29
Single answerGoogle Cloud PlatformYou are a Professional Machine Learning Engineer working for an e-commerce company. The company uses BigQuery ML to predict the likelihood of customers purchasing a product based on their browsing behavior. You have trained a logistic regression model using BigQuery ML and now want to generate predictions for new customer data stored in the new_customer_data table. Which SQL query should you use to generate predictions?
- A
SELECT * FROM ML.PREDICT(MODEL
project_id.dataset_id.model_name, TABLEproject_id.dataset_id.new_customer_data); - B
SELECT * FROM ML.EVALUATE(MODEL
project_id.dataset_id.model_name, TABLEproject_id.dataset_id.new_customer_data); - C
SELECT * FROM ML.TRAINING_INFO(MODEL
project_id.dataset_id.model_name); - D
SELECT * FROM ML.EXPLAIN_PREDICT(MODEL
project_id.dataset_id.model_name, TABLEproject_id.dataset_id.new_customer_data);
Show answer and explanation
Correct answer: A
Explanation
The ML.PREDICT function in BigQuery ML is designed to generate predictions on new data using a trained model. In this scenario, the logistic regression model has already been trained, and the developer needs to use ML.PREDICT with the appropriate syntax to obtain prediction results for the new_customer_data table.
- A. Correct.
This is the correct query to generate predictions using BigQuery ML. The ML.PREDICT function is specifically used to generate predictions on new input data.
- B. Incorrect.
This query is incorrect because ML.EVALUATE is used to evaluate the performance of a trained model on test data, not to generate predictions.
- C. Incorrect.
This query is incorrect because ML.TRAINING_INFO is used to retrieve metadata about the training process, such as training iterations and loss values, and is unrelated to generating predictions.
- D. Incorrect.
This query is incorrect because ML.EXPLAIN_PREDICT is used to obtain explainability insights for predictions but is not used to directly generate predictions.