scoring_explainer package

Init file for azureml-explain-model/azureml/explain/model/scoring/scoring_explainer.

Classes

ScoringExplainer

Defines a scoring model.

KernelScoringExplainer

Defines a scoring model based on KernelExplainer.

DeepScoringExplainer

Defines a scoring model based on DeepExplainer.

TreeScoringExplainer

Defines a scoring model based on TreeExplainer.

LinearScoringExplainer

Defines a scoring model based on LinearExplainer.

Functions

save(scoring_explainer, directory='.', exist_ok=False)

Save the scoring explainer to disk.

save(scoring_explainer, directory='.', exist_ok=False)

Parameters

scoring_explainer

The scoring explainer object which is to be saved. Will be written out to [directory]/scoring_explainer.pkl.

directory
str

The directory under which the serialized explainer should be stored. If it doesn't exist, it will be created.

default value: .
exist_ok
bool

If False (the default state), a warning will be thrown if the directory given already exists. If True, the current directory will be used and any overlapping contents will be overwritten.

default value: False

Returns

The path to the scoring explainer pickle file.

Return type

str

load(directory)

Load the scoring explainer from disk.

load(directory)

Parameters

directory
str

The directory under which the serialized explainer is stored. Assumes that scoring_explainer.pkl is available at the top level of the directory.

Returns

The scoring explainer from an explanation, loaded from disk.

Return type