CERTIFIED-MACHINE-LEARNING-PROFESSIONAL · Question #2
CERTIFIED-MACHINE-LEARNING-PROFESSIONAL Question #2: Real Exam Question with Answer & Explanation
The correct answer is C: mlflow.shap. mlflow.shap is MLflow's dedicated integration module for SHAP (SHapley Additive exPlanations), and it is the correct namespace for automatically computing and logging Shapley-based feature importance plots - specifically via mlflow.shap.log_explanation(), which takes a predict fu
Question
Which of the following MLflow operations can be used to automatically calculate and log a Shapley feature importance plot?
Options
- Amlflow.shap.log_explanation
- BNone of these operations can accomplish the task.
- Cmlflow.shap
- Dmlflow.log_figure
- Eclient.log_artifact
Explanation
mlflow.shap is MLflow's dedicated integration module for SHAP (SHapley Additive exPlanations), and it is the correct namespace for automatically computing and logging Shapley-based feature importance plots - specifically via mlflow.shap.log_explanation(), which takes a predict function and feature data, computes SHAP values internally, and logs both the values and a summary plot to the active run.
Why the distractors are wrong:
- A (
mlflow.shap.log_explanation) appears plausible but is a function within the module, not a standalone operation identifier in the way the question frames it - the module (mlflow.shap) is what "provides" the capability. - D (
mlflow.log_figure) only logs a pre-existing matplotlib/Plotly figure; it does not calculate anything automatically. - E (
client.log_artifact) logs a file path as an artifact - again, no automatic computation of SHAP values. - B (None of these) is wrong because
mlflow.shapabsolutely provides this capability.
Memory tip: Think of it as a namespace match - SHAP values → mlflow.shap. Just like mlflow.sklearn handles sklearn model logging, mlflow.shap handles all SHAP-specific operations. If you see "automatically calculate," that signals you need MLflow to do the math, which requires its dedicated integration module, not a generic logging helper.
Community Discussion
No community discussion yet for this question.