Google Professional Machine Learning Engineer Question 30
Single answerGoogle Cloud PlatformYou are a machine learning engineer at a retail company that uses Google Cloud. You have trained a regression model using BigQuery ML to predict product sales based on historical sales data. Now, you need to generate predictions using this model for the next quarter's data stored in a BigQuery table named future_sales_data. Which SQL query should you use to generate predictions?
- A
SELECT * FROM ML.PREDICT(MODEL
project.dataset.model_name, TABLEproject.dataset.future_sales_data) - B
SELECT * FROM ML.EVALUATE(MODEL
project.dataset.model_name, TABLEproject.dataset.future_sales_data) - C
SELECT * FROM ML.EXPLAIN(MODEL
project.dataset.model_name, TABLEproject.dataset.future_sales_data) - D
SELECT * FROM ML.FEATURE_INFO(MODEL
project.dataset.model_name)
Show answer and explanation
Correct answer: A
Explanation
To generate predictions using a BigQuery ML model, you use the ML.PREDICT function. This function applies the trained model to the input data and returns the predictions. Other functions such as ML.EVALUATE, ML.EXPLAIN, and ML.FEATURE_INFO serve different purposes and are not used for generating predictions.
- A. Correct.
This is the correct query to generate predictions using a BigQuery ML model. The ML.PREDICT function applies the given model to the provided input table to generate predictions.
- B. Incorrect.
This query is incorrect because ML.EVALUATE is used to assess the model's performance using evaluation metrics, not for generating predictions.
- C. Incorrect.
This query is incorrect because ML.EXPLAIN is used to interpret the model and understand feature importance, not for generating predictions.
- D. Incorrect.
This query is incorrect because ML.FEATURE_INFO is used to retrieve information about the input features of the model, not for generating predictions.