prophys.explain

prophys.explain#

Explanations of surrogates and of whole probabilistic models.

Local methods attribute single predictions of a surrogate to its inputs. System methods attribute a risk statistic of a model attribute to the model’s random inputs, including the epistemic uncertainty of its surrogates.

Classes

ShapValues

Feature attributions of individual predictions.

SystemShapley

Shapley attribution of a statistic of one attribute to its random inputs.

Functions

as_function

Wrap a surrogate, tree ensemble or callable as a batch prediction function.

expected_gradients

Expected gradients attributions of a differentiable model.

integrated_gradients

Integrated gradients attributions of a differentiable model.

kernel_shap

Approximate interventional Shapley values by KernelSHAP.

shapley_effects

Attribute a risk statistic of a model attribute to its random inputs by Shapley values.

shapley_values

Exact interventional Shapley values and pairwise interactions, for up to 16 features.

tree_shap

Exact path dependent TreeSHAP attributions of a tree ensemble.