class shap.AdditiveExplainer(model, masker)

Computes SHAP values for generalized additive models.

This assumes that the model only has first order effects. Extending this to 2nd and third order effects is future work (if you apply this to those models right now you will get incorrect answers that fail additivity).

__init__(model, masker)

Build an explainers.Exact object for the given model using the given masker object.

Parameters
modelfunction

A callable python object that executes the model given a set of input data samples.

 __init__(model, masker) Build an explainers.Exact object for the given model using the given masker object. explain_row(*row_args, max_evals, silent) Explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes). supports_model(model) Determines if this explainer can handle the given model.
explain_row(*row_args, max_evals, silent)
static supports_model(model)