Supplementary Material for Paper #9380

Contents

This archive contains several folders and files:

Software

How to set up our Python environment before running our scripts

How use our scripts

Description of our scripts

generate_data_RF.py

This script aims to generate results following a 10-cross validation process, as explained in the experimental section of the paper. To run it, please enter the following command python generate_data_RF.py {DatasetName} (the dataset is selected as an argument of the script). Results are saved in a .json file to be found in the directory "json". You can select what you want to compute or not by commenting the corresponding instructions (lines 180 to 254). By default, the command computes for each instance, a sufficient reason, a majoritary reason, an approximation of a minimal majoritary reason (obtained after 10s) and a LIME explanation. To avoid memory outs or unkilled jobs in case of brutal stop, the code is currently sequential. If expected, you can parallelize it by augmenting the number of workers stored (the value of variable "nb_w" at line 323). WARNING : Take care that there is no repository corresponding to the one you generate in cnf_files. If there is one, then you have to delete the former files (this is a security to prevent from overwriting everything at each run of the script).

to_plot.py

This script creates four plots for each .json file in result_RF and stores them in plot_rf. Yon can draw plots for specific datasets by changing lines 8/9

my_tree.py

This script contains pieces of code to encode decision trees and to analyze them

my_forest.py

This script contains pieces of code to encode forests of decision trees (particularly, random forest) and to analyze them

Other scripts