facet.explanation.PermutationExplainerFactory#

class facet.explanation.PermutationExplainerFactory(**explainer_kwargs)[source]#

A factory constructing Permutation explainer instances.

Bases

FunctionExplainerFactory

Metaclasses

ABCMeta

Parameters

explainer_kwargs (Any) – additional keyword arguments to be passed to the explainer

Method summary

make_explainer

Construct a new Explainer to compute shap values.

make_explainer_from_function

Construct an explainer from a function.

to_expression

Render this object as an expression.

Attribute summary

explains_raw_output

True if explainers made by this factory explain raw model output, False otherwise.

supports_shap_interaction_values

True if explainers made by this factory allow for calculating SHAP interaction values, False otherwise.

uses_background_dataset

True, since function explainers typically use a background dataset

explainer_kwargs

Additional keyword arguments to be passed to the explainer constructor.

Definitions

make_explainer(model, data)#

Construct a new Explainer to compute shap values.

Parameters
Return type

BaseExplainer

Returns

the new explainer instance

make_explainer_from_function(model_fn, data)[source]#

Construct an explainer from a function.

Parameters
Return type

BaseExplainer

Returns

the explainer

to_expression()[source]#

Render this object as an expression.

Return type

Expression

Returns

the expression representing this object

property explains_raw_output: bool#

True if explainers made by this factory explain raw model output, False otherwise.

Return type

bool

property supports_shap_interaction_values: bool#

True if explainers made by this factory allow for calculating SHAP interaction values, False otherwise.

Return type

bool

property uses_background_dataset: bool#

True, since function explainers typically use a background dataset

Return type

bool