Skip to main content

models.ShapValues

The result of shap_values.

Usage

Source

models.ShapValues(
    labels,
    values,
    baseline,
    outputs,
    method,
)

Attributes

labels: list of str

The features (or groups moved together).

values: list of list of float

values[i][j]: feature j’s contribution to row i.

baseline: float

The mean output over the background, v(empty).

outputs: list of float

Each row’s output; baseline + sum(values[i]) == outputs[i].

method: str
"exact" or "permutation".

Attributes

Name Description
mean_abs The mean absolute contribution of each feature: a global

mean_abs

The mean absolute contribution of each feature: a global

mean_abs

importance.