We use
SymPy [1]}
to generate synthetic models and represent expressions symbolically as expression trees. This allows us to automatically discover the additivity of arbitrary expressions.
See
Appendix A
for the unary and binary operators, parameters, and operation weights considered in random model generation.
All stochasticity is seeded for reproducibility, and all code is documented and open-sourcedThe source code for this work is available on GitHub:
https://github.com/craymichael/PostHocExplainerEvaluation.
The framework is implemented in
Python [2]}
with the help of SymPy and the additional libraries
NumPy [3]},
SciPy [4]},
pandas [5]},
Scikit-learn [6]},
Joblib [7]},
mpmath [8]},
pyGAM [9]},
PDPbox [10]},
alibi [11]},
TensorFlow [12]},
Matplotlib [13]},
and
seaborn [14]}.
Furthermore, we build a Python interface to the
R [15]}
package
shapr [16]}
using
rpy2 [17]}.
Appendix A
also details hyperparameters used to train the GAMs and sparse NNs, and the hardware used to run experiments.
Last, we consider the explanation of an effect to be 0 if every estimated contribution is within a toleranceSee the documentation of numpy.allclose for details. This is a fairer evaluation and tends to favor the explainers in experiments when dummy variables are present.
