This is an extended implementation of
Narodytska N, Ignatiev A, Pereira F, Marques-Silva J, Ras I. Learning Optimal Decision Trees with SAT. InIjcai 2018 Jul 13 (pp. 1362-1368).
We use the above paper to represent the decision trees with propositional logic and use this representation to find adversarial examples, to test for model robustness.
This is code is mainly based on the code written by Chengxi Yang
at https://github.com/kamikaze0923/SAT-Decision-Tree
One extension in our code is to use the proposed representaion to find model predictions.
The following logic will be used to traverse the tree: If a feature has been used to make a decision along
that path (
The same for
Use demo
notebook to see an example of how to use the code.