actableai.explanation package

Submodules

actableai.explanation.autogluon_explainer module

class actableai.explanation.autogluon_explainer.AutoGluonShapTreeExplainer(autogluon_predictor: autogluon.tabular.predictor.predictor.TabularPredictor)

Bases: object

AutoGluon Shap Tree Explainer Wrapper.

static is_predictor_compatible(autogluon_predictor: autogluon.tabular.predictor.predictor.TabularPredictor) bool

Check if an AutoGluon predictor is compatible with the Shap Tree Explainer.

Parameters
autogluon_predictor – The AutoGluon predictor to check.
Returns
True if the predictor is compatible.
shap_values(data: Union[pandas.core.frame.DataFrame, numpy.ndarray], *args: List[Any], **kwargs: Dict[str, Any]) pandas.core.frame.DataFrame

Compute shap values.

Parameters
  • data – The data to create the explanations for.
  • args – The arguments to pass to the underlying shap_values function.
  • kwargs – The named arguments to pass to the underlying shap_values function.
Returns

The shap values.

Module contents