Databricks Machine Learning Professional exam dumps

Databricks Machine Learning Professional practice question 49 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 49

Select 3

As a data scientist, you are training a machine learning model in Databricks and want to log and visualize important artifacts such as SHAP plots, a custom confusion matrix image, and metadata about feature importance. Which of the following steps should you take to properly log and view these artifacts using MLflow?

  1. A

    Use mlflow.log_artifact() to log the SHAP plot, confusion matrix image, and feature importance metadata.

  2. B

    Use mlflow.log_figure() to directly log the SHAP plot and confusion matrix image if they are matplotlib figures.

  3. C

    Use mlflow.log_param() to log the SHAP plot and confusion matrix image.

  4. D

    Store the confusion matrix image and SHAP plot as files and use mlflow.log_artifact() to log them.

  5. E

    Log feature importance metadata as a dictionary using mlflow.log_dict().

Show answer and explanation

Correct answers: B, D, E

Explanation

To properly log and visualize artifacts such as SHAP plots, confusion matrix images, and feature importance metadata in Databricks using MLflow, you need to use the appropriate MLflow functions for each type of artifact. mlflow.log_figure() is ideal for directly logging visualizations as matplotlib figures, mlflow.log_artifact() is used for files stored on disk, and mlflow.log_dict() is suitable for structured metadata like feature importance. Understanding and choosing the correct method ensures that artifacts are logged and visualized effectively.

  • A. Incorrect.

    Incorrect: mlflow.log_artifact() is used to log files such as images or other data stored on disk, but it is not the best method for directly logging a SHAP plot or matplotlib figures.

  • B. Correct.

    Correct: mlflow.log_figure() is specifically designed to log matplotlib figures or similar visualizations directly without needing to save them as files first.

  • C. Incorrect.

    Incorrect: mlflow.log_param() is used to log parameters (key-value pairs) but cannot handle visualizations like SHAP plots or confusion matrix images.

  • D. Correct.

    Correct: If the SHAP plot or confusion matrix image is stored as a file (e.g., PNG), mlflow.log_artifact() is an appropriate method to log these types of files.

  • E. Correct.

    Correct: Feature importance metadata can be logged as a dictionary using mlflow.log_dict(), which is well-suited for structured data like JSON or dictionaries.

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