peal.explainers.no_generator_counterfactual_explainers.DiCEExplainerConfig¶
- class peal.explainers.no_generator_counterfactual_explainers.DiCEExplainerConfig[source]¶
Bases:
ExplainerConfigConfig of
DiCEExplainer.- Parameters:
predictor_path (
str, optional) – Path of the predictor to explain when run stand-alone.distilled_predictor (
strordict, optional) – Optional student predictor spec (kept for API parity with CFKD).y_target_goal_confidence (
float) – Target-class confidence regarded as a successful flip.num_attempts (
int) – Number of counterfactuals DiCE is asked for per factual (total_CFs).parallel_attempts (
int) – Kept for API parity; DiCE explains samples one at a time.method (
str) – DiCE search method:"random","genetic"or"kdtree".features_to_vary (
listorstr) – Feature names DiCE may change, or"all".proximity_weight (
float) – DiCE loss weights. Stored on the config but not currently passed togenerate_counterfactuals.sparsity_weight (
float) – DiCE loss weights. Stored on the config but not currently passed togenerate_counterfactuals.diversity_weight (
float) – DiCE loss weights. Stored on the config but not currently passed togenerate_counterfactuals.
Methods
Attributes
The type of explanation that shall be used.
The number of counterfactuals created for the same sample.
How many counterfactuals are created for the same factual in parallel.