Skip to content

Latest commit

 

History

History
 
 

14 - SHAP

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

14 SHAP for Actuaries: Explain any Model

This sub-repository contains both Python and R notebooks with models and analyses similar (but not 100% equal) to the results published in the tutorial "SHAP for Actuaries: Explain any Model" of M. Mayer, D. Meier, and M.V. Wüthrich.

Accompanying code

  • shap_tutorial.ipynb: Python notebook using the conda env specified in "environment.yml"
  • shap_tutorial.Rmd: R Markdown file

Both codes use the following data:

Data

The folder "rdata" contains the Parquet file "df.parquet", representing 1 mio rows of synthetic (but realistic) claims frequency data.

Code output

  • Python: Click on the ipynb file
  • R: shap.html (please click on this link to preview html output; in order to see the table of contents properly, download the html and open it in your browser.)