You need to have a Linux OS in order to run the scripts. First of all, create a conda environment:
open a terminal in the right directory and type:
conda env create --file environment.yml
. Then, activate this environment: conda activate
paper8921
This script generates and displays a heatmap, two sufficient reasons, and relevant/necessary literals for the mnist
instances.
By default, you have 8 or 3, you can change and generate 4 and 9 by modifying line 28 of this script.
To run it, please enter the following command python3 mnist.py
This script generates some examples for a given dataset. For 10 instances, it computes and displays
a sufficient reason, a maximum number of 1000 minimal sufficient reasons, the necessary and relevant literals, a maximum number of 10 000 sufficient reasons, and the
explanatory importance of
literals. To run it, please enter the following command: python3 test_DT.py dataset/compas.csv
(the dataset is selected as an argument of the script).
This script allows to generate results following a 10-fold cross validation process, as explained in the experimental section of the paper.
To run the script, please enter the following command python3 generate_data_DT.py dataset/compas.csv
(the dataset is selected as an argument of the script). The results are saved in a .json file to be found in the
folder "json" (this folder is empty at start but it must exist for the script to run smoothly).
The script my_tree.py contains the algorithms presented in the paper and used to derive sufficient reasons, to derive minimal sufficient reasons, to compute necessary and relevant features, etc.
The script coding_CNF.py contains several encodings of cardinality constraints into the CNF format.