Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 1.04 KB

File metadata and controls

11 lines (8 loc) · 1.04 KB

PaperShapleyValuesImprovingKernelSHAP

Relevant code to the "Improving the Weighting Strategy in KernelSHAP" paper by Lars Henry Berge Olsen and Martin Jullum.

There is a three (or four) step procedure to replicate Figure 2 in the paper.

  1. (Optional) Run the file Run_model.R to create the model and compute the true Shapley values. This is very time consuming and the output is saved in the rds folder.
  2. Run the file Run_sampling.R with the desired number of repetitions B to generate files that generates and store the sampled coalitions using the different sampling strategies.
  3. Run the file Run_SV.R to compute the MAE error between the estimated and true Shapley values for different number of used unique coalitions, and store the results as data tables to disk.
  4. Run the file Run_plot.R to load the data tables with the MAE and make the plot.

Note. We have only made the models and true Shapley values available for the M=10 simulation study, as the files are several GBs for the M = 20 setting and it thus not suitable for GitHub.