Databricks Certified Machine Learning Associate · Free Practice Question Medium

Question 11

A senior data scientist is working on a machine learning project using MLflow. They want to implement a feature that allows for model explanations and interpretability.

Which MLflow component or library should they use for model interpretation?

  • A

    mlflow.tensorflow

  • B

    mlflow.sklearn

  • C

    mlflow.shap

  • D

    mlflow.pytorch

Reveal correct answer

Correct answer: C

Explanation

Correct Answer:
mlflow.shap

Explanation:

  1. Why This Is Correct?

    • mlflow.shap is MLflow’s built-in integration with SHAP (SHapley Additive exPlanations), a leading library for model interpretability. It:

      • Generates feature importance scores (global interpretability).

      • Produces local explanations (per-prediction reasoning).

      • Logs visualizations (e.g., force plots, summary plots) as MLflow artifacts.

    • Example:


  2. Key Features:

    • Unified Tracking: SHAP outputs appear in the MLflow UI under the run’s artifacts.

    • Model-Agnostic: Works with sklearn, PyTorch, TensorFlow, etc.

Why Other Options Are Incorrect?

  • mlflow.sklearn/mlflow.pytorch/mlflow.tensorflow:

    • These log models and metrics, but not explanations.

Key Takeaway:

For model interpretability in MLflow:

  1. Use mlflow.shap for SHAP-based explanations.

  2. For non-SHAP methods (e.g., LIME), log custom plots via mlflow.log_artifact().

Pro Tip: Compare explanations across runs using MLflow’s artifact diff view.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need