Sandbox
What is the smallest change that would make the model decide differently? DPG-CF answers with counterfactual examples. It reads class intervals for each feature off the model's Decision Predicate Graph, combines them with rules about which features may change and in which direction, and searches inside them. The search never looks at the training data. Everything runs in your browser.
The first start downloads Python and scikit-learn (about 40 MB), which can take a minute; later visits use the browser cache.
1 Train a model and read its constraints
80/20 train/test split. The DPG is built from the training part only.
2 Choose an instance to explain
Train a model first.
Target class
Search
Advanced
Actionability
Which features may change, and in which direction. A feature with no DPG constraint for the target class stays fixed in any case.
3 Counterfactuals
Pick an instance and a target class, then generate.