qshap: Fast Calculation of Feature Contributions in Boosting Trees

Computes feature-specific R-squared (R2) contributions for boosting tree models using a Shapley-value-based decomposition of the total R-squared in polynomial time. Supports models fitted with 'XGBoost', 'LightGBM', and 'CatBoost', with optimized backend-specific implementations and cached tree summaries suitable for large-scale problems. Multiple visualization tools are included for interpreting and communicating feature contributions. The methodology is described in Jiang, Zhang, and Zhang (2025) <doi:10.48550/arXiv.2407.03515>. Optional 'CatBoost' support uses the R package 'catboost', which is not distributed on CRAN; installation instructions and released binaries are provided by the CatBoost project at <https://catboost.ai/docs/en/concepts/r-installation>.

Package details

AuthorSteven He [aut], Zhongli Jiang [aut, cre], Dabao Zhang [aut]
MaintainerZhongli Jiang <zhongli.jiang.stats@gmail.com>
LicenseGPL (>= 2)
Version2.0.0
URL https://github.com/catstats/Q-SHAP_R
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("qshap")

Try the qshap package in your browser

Any scripts or data that you put into this service are public.

qshap documentation built on Aug. 23, 2026, 5:11 p.m.