Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 20 of 280

Databricks Certified Machine Learning Professional. Professional level, Databricks. Free question with the correct answer and a full explanation.

Databricks Machine Learning Professional Question 20

Select 3

You are building a machine learning model to predict house prices using Databricks, and you want to manually log parameters, models, and evaluation metrics using MLflow. After training the model, you decide to log the learning rate used for training, the trained model itself, and the RMSE (Root Mean Squared Error) of the model predictions. Which of the following MLflow methods should you use to accomplish this?

  1. A

    mlflow.log_param('learning_rate', learning_rate_value)

  2. B

    mlflow.log_metric('rmse', rmse_value)

  3. C

    mlflow.log_artifact('trained_model.pkl')

  4. D

    mlflow.log_model(trained_model, 'model_directory')

  5. E

    mlflow.log_dataset('training_data', training_data)

Show answer and explanation

Correct answers: A, B, D

Explanation

To manually log parameters, metrics, and models using MLflow, you should use the appropriate logging methods: mlflow.log_param for parameters like learning rate, mlflow.log_metric for evaluation metrics like RMSE, and mlflow.log_model for saving the trained model. The other options either refer to non-existent methods or are not suitable for this specific scenario.

  • A. Correct.

    Correct. The mlflow.log_param method is used to log key-value pairs of parameters, such as the learning rate used during training.

  • B. Correct.

    Correct. The mlflow.log_metric method is used to log evaluation metrics, such as RMSE, which is a numerical evaluation score.

  • C. Incorrect.

    Incorrect. The mlflow.log_artifact method is used to log files or directories, but it is not directly applicable for logging models or metrics.

  • D. Correct.

    Correct. The mlflow.log_model method is used to log a trained machine learning model, along with its associated metadata, to MLflow.

  • E. Incorrect.

    Incorrect. The mlflow.log_dataset method does not exist in MLflow. Logging datasets is not directly supported by MLflow in this manner.

Timed practice exam

Take a Databricks Machine Learning Professional 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