alibi.api.defaults module

This module defines the default metadata and data dictionaries for each explanation method. Note that the “name” field is automatically populated upon initialization of the corresponding Explainer class.

alibi.api.defaults.DEFAULT_DATA_ALE: dict = {'ale0': [], 'ale_values': [], 'constant_value': None, 'feature_deciles': None, 'feature_names': None, 'feature_values': [], 'target_names': None}

Default ALE data.

alibi.api.defaults.DEFAULT_DATA_ANCHOR: dict = {'anchor': [], 'coverage': None, 'precision': None, 'raw': None}

Default anchor data.

alibi.api.defaults.DEFAULT_DATA_ANCHOR_IMG: dict = {'anchor': [], 'coverage': None, 'precision': None, 'raw': None, 'segments': None}

Default anchor image data.

alibi.api.defaults.DEFAULT_DATA_CEM = {'PN': None, 'PN_pred': None, 'PP': None, 'PP_pred': None, 'X': None, 'X_pred': None, 'grads_graph': None, 'grads_num': None}

Default CEM data.

alibi.api.defaults.DEFAULT_DATA_CF: dict = {'all': [], 'cf': None, 'orig_class': None, 'orig_proba': None, 'success': None}

Default counterfactual data.

alibi.api.defaults.DEFAULT_DATA_CFP: dict = {'all': [], 'cf': None, 'id_proto': None, 'orig_class': None, 'orig_proba': None}

Default counterfactual prototype metadata.

alibi.api.defaults.DEFAULT_DATA_INTGRAD: dict = {'X': None, 'attributions': None, 'baselines': None, 'deltas': None, 'predictions': None}

Default IntegratedGradients data.

alibi.api.defaults.DEFAULT_DATA_KERNEL_SHAP: dict = {'categorical_names': {}, 'expected_value': [], 'feature_names': [], 'link': 'identity', 'raw': {'importances': {}, 'instances': None, 'prediction': None, 'raw_prediction': None}, 'shap_values': []}

Default KernelSHAP data.

alibi.api.defaults.DEFAULT_DATA_TREE_SHAP: dict = {'categorical_names': {}, 'expected_value': [], 'feature_names': [], 'model_output': None, 'raw': {'importances': {}, 'instances': None, 'labels': None, 'loss': None, 'prediction': None, 'raw_prediction': None}, 'shap_interaction_values': [], 'shap_values': []}

Default TreeSHAP data.

alibi.api.defaults.DEFAULT_META_ALE: dict = {'explanations': ['global'], 'name': None, 'params': {}, 'type': ['blackbox']}

Default ALE metadata.

alibi.api.defaults.DEFAULT_META_ANCHOR = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox']}

Default anchor metadata.

alibi.api.defaults.DEFAULT_META_CEM = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox', 'tensorflow', 'keras']}

Default CEM metadata.

alibi.api.defaults.DEFAULT_META_CF = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox', 'tensorflow', 'keras']}

Default counterfactual metadata.

alibi.api.defaults.DEFAULT_META_CFP = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox', 'tensorflow', 'keras']}

Default counterfactual prototype metadata.

alibi.api.defaults.DEFAULT_META_INTGRAD: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['whitebox']}

Default IntegratedGradients metadata.

alibi.api.defaults.DEFAULT_META_KERNEL_SHAP: dict = {'explanations': ['local', 'global'], 'name': None, 'params': {}, 'task': None, 'type': ['blackbox']}

Default KernelSHAP metadata.

alibi.api.defaults.DEFAULT_META_TREE_SHAP: dict = {'explanations': ['local', 'global'], 'name': None, 'params': {}, 'task': None, 'type': ['whitebox']}

Default TreeSHAP metadata.