[This article was first published on R – Michael's and Christian's Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.SHAP interaction strength for the XGBoost model (single variables reflect SHAP main effect strength). Our two sister packages are continuously being improved. A brief summary of the latest changes:shapviz (v0.10.2)Identical axes, axis titles and color bars are now collected across dependence plots.Dependence plots have received arguments share_y=FALSE and ylim=NULL for better comparability across subplots.New visualization for SHAP interaction strenght via sv_interaction(kind="bar"). It shows mean absolute SHAP interaction/main effects, where the interaction values are multiplied by two for symmetry.kernelshap (v0.9.1)permshap() now offers a balanced sampling version which iterates until convergence and returns standard errors. It is used by default when the model has more than eight features, or by setting exact=FALSE.Fixed an error in kernelshap() which made the resulting values slightly off for models with interactions of order three or higher. Now, the exact version returns the same values as exact permutation SHAP and agrees with the exact explainer in Python’s shap package.Illustrating sampling permutation SHAPLet’s use a beautiful dataset on medical costs to fit a log-linear Gamma GLM with interactions between all features and smoking, and explain it by SHAP on log prediction (= linear) scale.Since the model does not contain interactions of order above 2, the SHAP values perfectly reconstruct the estimated model coefficients, see our recent paper on https://arxiv.org/abs/2508.12947 for a proof.Smoking and age are the most important features. Some strong interactions with smoking are visible. Rlibrary(xgboost)library(ggplot2)library(patchwork)library(shapviz)library(kernelshap)options(shapviz.viridis_args = list(option = "D", begin = 0.1, end = 0.9))set.seed(1)# https://github.com/stedy/Machine-Learning-with-R-datasetsdf