Google Professional Machine Learning Engineer exam dumps

Google Professional Machine Learning Engineer practice question 27 of 522

Professional Machine Learning Engineer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Machine Learning Engineer Question 27

Single answerGoogle Cloud Platform

You are a data scientist working for a retail company. You have trained a BigQuery ML model to predict customer churn using a logistic regression model. Now, you want to generate predictions for a new set of customer data stored in a BigQuery table called customer_data.new_customers. Which SQL query should you use to generate these predictions while ensuring the predicted probability is included in the output?

  1. A

    SELECT * FROM ML.PREDICT(MODEL retail_dataset.churn_model, TABLE customer_data.new_customers)

  2. B

    SELECT predicted_label, * FROM ML.TRAIN(MODEL retail_dataset.churn_model, TABLE customer_data.new_customers)

  3. C

    SELECT predicted_label, predicted_probability FROM ML.PREDICT(MODEL retail_dataset.churn_model, TABLE customer_data.new_customers)

  4. D

    SELECT predicted_probability FROM ML.EVALUATE(MODEL retail_dataset.churn_model, TABLE customer_data.new_customers)

Show answer and explanation

Correct answer: C

Explanation

The correct query to generate predictions with probabilities in BigQuery ML is to use the ML.PREDICT function. This function applies the trained model to the specified input data and produces the predicted labels and probabilities. Including both predicted_label and predicted_probability in the SELECT statement ensures that the output contains the necessary prediction details.

  • A. Incorrect.

    This is incorrect because the SELECT * syntax will include all columns from the input table but does not ensure that the predicted probabilities are explicitly included in the output.

  • B. Incorrect.

    This is incorrect because ML.TRAIN is used for training a model, not for generating predictions. It does not produce predictions or probabilities.

  • C. Correct.

    This is correct because ML.PREDICT is the correct function to use for generating predictions. Specifying predicted_label and predicted_probability ensures that both the classification result and the probability are included in the output.

  • D. Incorrect.

    This is incorrect because ML.EVALUATE is used to evaluate the performance of a model on a dataset, not to generate predictions for new data.

Timed practice exam

Take a Google Professional Machine Learning Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam