This code is a companion to the paper Understanding TreeSHAP and acts as supplementary materials for the interested reader. Two C++ implementations of Interventional TreeSHAP and Taylor-TreeSHAP are provided. Said implementations use the same notation as the paper. Our TreeSHAP implementation is not meant to be a replacement to the well-established SHAP library. Is is rather intended as a tool to teach the method or to drive new research for on the topic of explaining tree ensembles with game-theory indices.
To setup the virtual environement, we suggest to use Anaconda. Once it is installed, run
conda env create --file environment.yml
Then, the C++ implementations of Interventional TreeSHAP and Taylor-TreeSHAP can be complied with setuptools.
python setup.py build
If everything worked properly, you should see a directory build/ that contains the shared library
.so
.
TODO : discuss the tree structures and the way the sets
TODO : present some of the basic tutorials.