shap.Explanation
- class shap.Explanation(values, base_values=None, data=None, display_data=None, instance_names=None, feature_names=None, output_names=None, output_indexes=None, lower_bounds=None, upper_bounds=None, error_std=None, main_effects=None, hierarchical_values=None, clustering=None, compute_time=None)
A sliceable set of parallel arrays representing a SHAP explanation.
- __init__(values, base_values=None, data=None, display_data=None, instance_names=None, feature_names=None, output_names=None, output_indexes=None, lower_bounds=None, upper_bounds=None, error_std=None, main_effects=None, hierarchical_values=None, clustering=None, compute_time=None)
Methods
__init__
(values[, base_values, data, ...])cohorts
(cohorts)Split this explanation into several cohorts.
hstack
(other)Stack two explanations column-wise.
percentile
(q[, axis])Attributes
abs
argsort
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
flip
hclust
Pass-through from the underlying slicer object.
identity
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
max
mean
min
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
sample
Compute the shape over potentially complex data nesting.
sum
Pass-through from the underlying slicer object.
Pass-through from the underlying slicer object.
- property base_values
Pass-through from the underlying slicer object.
- property clustering
Pass-through from the underlying slicer object.
- cohorts(cohorts)
Split this explanation into several cohorts.
- Parameters:
- cohortsint or array
If this is an integer then we auto build that many cohorts using a decision tree. If this is an array then we treat that as an array of cohort names/ids for each instance.
- property data
Pass-through from the underlying slicer object.
- property display_data
Pass-through from the underlying slicer object.
- property error_std
Pass-through from the underlying slicer object.
- property feature_names
Pass-through from the underlying slicer object.
- property hierarchical_values
Pass-through from the underlying slicer object.
- hstack(other)
Stack two explanations column-wise.
- property instance_names
Pass-through from the underlying slicer object.
- property lower_bounds
Pass-through from the underlying slicer object.
- property main_effects
Pass-through from the underlying slicer object.
- property output_indexes
Pass-through from the underlying slicer object.
- property output_names
Pass-through from the underlying slicer object.
- property shape
Compute the shape over potentially complex data nesting.
- property upper_bounds
Pass-through from the underlying slicer object.
- property values
Pass-through from the underlying slicer object.