This code was originally developed for Datta-Sen-Zick Oakland'16 but has evolved since. Presently the tool requires python2 in some cases so if something is going wrong, make sure you run it with python2 instead of python3.
-
To install required python modules:
make requirements -
To try on the adult dataset run:
python2 qii.py adult --show-plot -
To see additional options, run:
python2 qii.py -h
-h,--helpShow this help message and exit-m {average-unary-individual,unary-individual,discrim,banzhaf,shapley}--measure {...}Quantity of interest-s SENSITIVE, --sensitive SENSITIVESensitive field-t TARGET,--target TARGETTarget field-e,--erase-sensitiveErase sensitive field from dataset-p,--show-plotOutput plot as pdf-o,--output-pdfOutput plot as pdf-c {logistic,svm,decision-tree,decision-forest},--classifier {...}Classifier(s) to use--max_depth MAX_DEPTHMax depth for decision trees and forests--n_estimators N_ESTIMATORSNumber of trees for decision forests--seed SEEDRandom seed, auto seeded if not specified-a ACTIVE_ITERATIONS,--active-iterations ACTIVE_ITERATIONSActive Learning Iterations-r,--record-counterfactualsStore counterfactual pairs for causal analysis-i INDIVIDUAL,--individual INDIVIDUALIndex for Individualized Transparency Report--batch_mode BATCH_MODERun in batch mode--batch_mode_samples BATCH_MODE_SAMPLESNumber of samples to compute.--output_suffix OUTPUT_SUFFIXOutput suffix for output in batch mode
- adult : UCI Income dataset
- iwpc : Warfarin dosage
- nlsy97 : Arrest prediction from the NLSY 97
- discrim : Unary QII on discrimination
- average-unary-individual : Average unary QII
- unary-individual : Unary QII on individual outcome (use -i k) for kth individual
- general-inf : Influence on average classification
- shapley : Shapley QII (use -i k) for kth individual
- banzhaf : Banzhaf QII (use -i k) for kth individual