Fast Calculation of Feature Contributions in Boosting Trees
Overview
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.
Install
Health
WARNINGloading without being on the library search pathr-devel-windows-x86_64
Error: package or namespace load failed for 'qshap' in library.dynam(lib, package, package.lib): DLL 'Matrix' not found: maybe not installed for this architecture? In addition: Warning messages: 1: In loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : package 'Matrix' has no 'package.rds' in Meta/ 2: S3 methods 'as.matrix.Matrix', 'as.matrix.sparseVector', 'as.array.Matrix', 'as.array.sparseVector', 'c.sparseVector', 'c.abIndex', 'print.diagSummary', 'print.sparseSummary' were declared in NAMESPACE but not found Execution halted It looks like this package has a loading problem when not on .libPaths: see the messages for details.
- WARNING12 OK, 1 WARNING2026-10-20
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-04-22
- ERROR13 OK, 1 ERROR2026-04-18
Show 1 earlier changeHide 1 earlier change
- OK5 OK2026-03-17
Documentation
- Help pages
- 32 (16 internal)includes a package overview page
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 57%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 3%
Downloads
Repository
- PRs merged (all time)
- 90%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
PRs over time
Commits over time
2 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/catstats/q-shap_r on 2026-10-22.
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2026-01-27Pull request: opened by its own accountCommits: 50 by its own account
- Claude Codefirst seen 2026-03-25Pull request it wrote: opened by a project memberCommits: at least 4 crediting it in the message
- Claude Opus 4.64 commits · Mar to May 2026
Dependencies
Installing qshap adds 28 packages (13 with compiled code, 27 MB of source tarballs). Heaviest: ggplot2 6.0 MB, data.table 5.7 MB, Rcpp 1.8 MB.
Code & Tests
People & History
Package metadata
- First published
- 2026-03-16
- Total releases
- 3 / 1 yrs
- License
- GPL (>= 2) OSI
- Download size
- 68 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("qshap")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.