DeepScoringExplainer class

Definition

Defines a scoring model based on DeepExplainer.

If the original explainer was using a SHAP DeepExplainer and no initialization data was passed in, the core of the original explainer will be reused. If the original explainer used another method or new initialization data was passed in under initialization_examples, a new explainer will be created.

If transformations was passed in on original_explainer, those transformations will be carried through to the scoring explainer, it will expect raw data, and by default importances will be returned for raw features. If feature_maps are passed in here (NOT intended to be used at the same time as transformations), the explainer will expected transformed data, and by default importances will be returned for transformed data. In either case, the output can be specified by setting get_raw explicitly to True or False on the explainer's explain method.

DeepScoringExplainer(original_explainer, initialization_examples=None, serializer=None, **kwargs)
Inheritance
azureml._logging.chained_identity.ChainedIdentity
azureml.interpret.scoring.scoring_explainer._scoring_explainer.ScoringExplainer
DeepScoringExplainer

Parameters

original_explainer
BaseExplainer

The training time deep explainer originally used to explain the model.

initialization_examples
array or DataFrame or DenseData or csr_matrix

A matrix of feature vector examples (# examples x # features) for initializing the explainer.

serializer
An object with save method that returns a dictionary state and load method that returns the model.

Picklable custom serializer with save and load methods defined for model that is not serializable.

Methods

explain(evaluation_examples, get_raw=None)

Use the DeepExplainer and deep model for scoring to get the feature importance values of data.

explain(evaluation_examples, get_raw=None)

Use the DeepExplainer and deep model for scoring to get the feature importance values of data.

explain(evaluation_examples, get_raw=None)

Parameters

evaluation_examples
array or DataFrame or csr_matrix

A matrix of feature vector examples (# examples x # features) on which to explain the model's output.

get_raw
bool
default value: None

If True, importance values for raw features will be returned. If False, importance values for engineered features will be returned. If unspecified and transformations was passed into the original explainer, raw importances will be returned. If unspecified and feature_maps was passed into the scoring explainer, engineered importance values will be returned.

Returns

For a model with a single output such as regression, this returns a matrix of feature importance values. For models with vector outputs this function returns a list of such matrices, one for each output. The dimension of this matrix is (# examples x # features).

Return type