This repository contains the code we used for our experiments presented in the paper "Learning fair rule lists"
The file genParetoCrossValMultithrV2.py can be used to build the Pareto Front using grid search on Lambda.
The file genParetoCrossValMultithrV3.py can be used to build the Pareto Front using the Hyperopt library (https://github.com/hyperopt/hyperopt) to automatically optimize the value of Lambda using the provided Tree of Parzen Estimators method.
Usage :
python genParetoCrossValMultithrVx.py dataset_name -p protected_attribute_column
Where :
xis either2or3dataset_namecan be eitheradult,compas,german_credit, ordefault_creditprotected_attribute_columnis the index of the sensitive attribute column (standard values for each dataset are indicated in the scripts' comments)
NB : All other parameters (maximum number of nodes to be explored, values of Lambda for grid search, maximum number of iterations allowed for Hyperopt, unsensitive attribute column or specification, etc.) can be set easily at the beginning of each script's body.
The file audit_mdl.py can be used to produce a feature dependence analysis of a given model.
Usage :
python audit_mdl.py
All parameters and file requirements can be found in the script's comments.