evalml.model_understanding.prediction_explanations.
explain_predictions
Creates a report summarizing the top contributing features for each data point in the input features.
XGBoost models and CatBoost multiclass classifiers are not currently supported.
pipeline (PipelineBase) – Fitted pipeline whose predictions we want to explain with SHAP.
input_features (pd.DataFrame) – Dataframe of input data to evaluate the pipeline on.
training_data (pd.DataFrame) – Dataframe of data the pipeline was fit on. This can be omitted for pipelines with tree-based estimators.
top_k_features (int) – How many of the highest/lowest contributing feature to include in the table for each data point.
include_shap_values (bool) – Whether SHAP values should be included in the table. Default is False.
The table will have the following columns: Feature Name, Contribution to Prediction, SHAP Value (optional), and each row of the table will be a feature.