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: dict = {'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_CFRL: dict = {'cf': None, 'condition': None, 'orig': None, 'target': None}
Default CounterfactualRL data.
- alibi.api.defaults.DEFAULT_DATA_INTGRAD: dict = {'X': None, 'attributions': None, 'baselines': None, 'deltas': None, 'forward_kwargs': None, 'predictions': None}
Default IntegratedGradients data.
- alibi.api.defaults.DEFAULT_DATA_KERNEL_SHAP: dict = {'categorical_names': {}, 'expected_value': [], 'feature_names': [], 'raw': {'importances': {}, 'instances': None, 'prediction': None, 'raw_prediction': None}, 'shap_values': []}
Default KernelShap data.
- alibi.api.defaults.DEFAULT_DATA_PD: dict = {'feature_deciles': None, 'feature_names': None, 'feature_values': None, 'ice_values': None, 'pd_values': None}
Default PartialDependence data.
- alibi.api.defaults.DEFAULT_DATA_PDVARIANCE: dict = {'conditional_importance': None, 'conditional_importance_values': None, 'feature_deciles': None, 'feature_importance': None, 'feature_interaction': None, 'feature_names': None, 'feature_values': None, 'pd_values': None}
Default PartialDependenceVariance data.
- alibi.api.defaults.DEFAULT_DATA_PERMUTATION_IMPORTANCE: dict = {'feature_importance': None, 'feature_names': None, 'metric_names': None}
Default PermutationImportance data.
- alibi.api.defaults.DEFAULT_DATA_PROTOSELECT: dict = {'prototype_indices': None, 'prototype_labels': None, 'prototypes': None}
Default ProtoSelect data.
- alibi.api.defaults.DEFAULT_DATA_SIM: dict = {'least_similar': None, 'most_similar': None, 'ordered_indices': None, 'scores': None}
Default SimilarityExplainer data.
- alibi.api.defaults.DEFAULT_DATA_TREE_SHAP: dict = {'categorical_names': {}, 'expected_value': [], 'feature_names': [], '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'], 'version': None}
Default ALE metadata.
- alibi.api.defaults.DEFAULT_META_ANCHOR: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox'], 'version': None}
Default anchor metadata.
- alibi.api.defaults.DEFAULT_META_CEM: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox', 'tensorflow', 'keras'], 'version': None}
Default CEM metadata.
- alibi.api.defaults.DEFAULT_META_CF: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox', 'tensorflow', 'keras'], 'version': None}
Default counterfactual metadata.
- alibi.api.defaults.DEFAULT_META_CFP: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox', 'tensorflow', 'keras'], 'version': None}
Default counterfactual prototype metadata.
- alibi.api.defaults.DEFAULT_META_CFRL: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['blackbox'], 'version': None}
Default CounterfactualRL metadata.
- alibi.api.defaults.DEFAULT_META_INTGRAD: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['whitebox'], 'version': None}
Default IntegratedGradients metadata.
- alibi.api.defaults.DEFAULT_META_KERNEL_SHAP: dict = {'explanations': ['local', 'global'], 'name': None, 'params': {'group_names': None, 'grouped': None, 'groups': None, 'kwargs': None, 'link': None, 'summarise_background': None, 'summarise_result': None, 'transpose': None, 'weights': None}, 'task': None, 'type': ['blackbox'], 'version': None}
Default KernelShap metadata.
- alibi.api.defaults.DEFAULT_META_PD: dict = {'explanations': ['global'], 'name': None, 'params': {}, 'type': ['blackbox'], 'version': None}
Default PartialDependence metadata.
- alibi.api.defaults.DEFAULT_META_PDVARIANCE: dict = {'explanations': ['global'], 'name': None, 'params': {}, 'type': ['blackbox'], 'version': None}
Default PartialDependenceVariance metadata.
- alibi.api.defaults.DEFAULT_META_PERMUTATION_IMPORTANCE: dict = {'explanations': ['global'], 'name': None, 'params': {}, 'type': ['blackbox'], 'version': None}
Default PermutationImportance metadata.
- alibi.api.defaults.DEFAULT_META_PROTOSELECT: dict = {'explanation': ['global'], 'name': None, 'params': {}, 'type': ['data'], 'version': None}
Default ProtoSelect metadata.
- alibi.api.defaults.DEFAULT_META_SIM: dict = {'explanations': ['local'], 'name': None, 'params': {}, 'type': ['whitebox'], 'version': None}
Default SimilarityExplainer metadata.
- alibi.api.defaults.DEFAULT_META_TREE_SHAP: dict = {'explanations': ['local', 'global'], 'name': None, 'params': {'algorithm': None, 'approximate': None, 'explain_loss': None, 'interactions': None, 'kwargs': None, 'model_output': None, 'summarise_background': None, 'summarise_result': None}, 'task': None, 'type': ['whitebox'], 'version': None}
Default TreeShap metadata.
- alibi.api.defaults.KERNEL_SHAP_PARAMS = ['link', 'group_names', 'grouped', 'groups', 'weights', 'summarise_background', 'summarise_result', 'transpose', 'kwargs']
KernelShap parameters updated and returned in
metadata['params']
. Seealibi.explainers.shap_wrappers.KernelShap
.
- alibi.api.defaults.TREE_SHAP_PARAMS = ['model_output', 'summarise_background', 'summarise_result', 'approximate', 'interactions', 'explain_loss', 'algorithm', 'kwargs']
TreeShap parameters updated and returned in
metadata['params']
. Seealibi.explainers.shap_wrappers.TreeShap
.