Opening the Black Box
Interpreting Machine Learning Models with SHAP Values in R
A 90-minute tutorial at uRos2026 (Use of R in Official Statistics), Paris, 18 November 2026.
Many machine learning models are accurate but opaque. This tutorial opens the black box with SHAP values: what they are, how they’re computed, and how to read them; with far more practice than theory.
Where to go
Getting set up
Two set-ups are possible: on your own machine (clone the repo, restore the environment) or on the RStudio Server. A local install is best done before the session.
Slides
The deck used during the live session: light on text, built around interactive widgets, an app and coding exercises.
Course notes
The full reference document (theory, code, context…), not narrated live. Feel free to read it before or after the session, at your own pace.
Further reading
DALEXdocumentation: https://modeloriented.github.io/DALEX/: theexplain()-based tools (feature importance, PDP, break-down and SHAP), used throughout the tutorialDALEXtradocumentation: https://modeloriented.github.io/DALEXtra/: the extension ofDALEXthat providesexplain_tidymodels(), the explainer used fortidymodelsworkflowsshapvizdocumentation: https://modeloriented.github.io/shapviz/: the waterfall, beeswarm and dependence plots of the TreeSHAP part, with support for several other modelling packages beyond LightGBMkernelshap: https://CRAN.R-project.org/package=kernelshap: KernelSHAP for any model, includingtidymodelsworkflowsfairmodels: https://fairmodels.drwhy.ai/: fairness checks between protected groups, from the sameDALEXexplainer- Molnar, Interpretable Machine Learning (Molnar 2025): the reference book, with chapters on SHAP, PDP and permutation importance
- Biecek and Burzykowski, Explanatory Model Analysis (Biecek and Burzykowski 2021): the book behind
DALEX(break-down, SHAP, profiles) - Lundberg et al. (Lundberg et al. 2020): TreeSHAP and global understanding of tree models
- Aas et al. (Aas et al. 2021): SHAP with dependent features
See you in Paris! 🚀