Skip to content

qshap

2.0.0Package record

Fast Calculation of Feature Contributions in Boosting Trees

0packages depend
2.2Kdownloads / year
40.3%test coverage
12/13flavors OK

Overview

About

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

CRAN checks
1WARNING12OK
Check messages
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.

CRAN check page ↗

Slowest check: 4.8 min · r-devel-windows-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 2.0.0
README· In the repository, left out of the releaseVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
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

2.2K
CRAN downloads in the past year
Rank #19,031 · ~6/day · ~187/mo
Daily download trend is not available in this view yet.
19230 days
69490 days
2.2K1 year
Compare downloads with other packages →
Also on217 r2u2 autocran

Repository

2Stars
0Forks
0Open issues
0Open PRs
0Releases
189Commits
3Commit identities
189 commits · Last activity 2026-08-23 · 0% stars, 30d
Responsiveness
How these are sampled
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

2026-04-10 · 12026-07-07 · 2
PracticesBeta

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.

Continuous integration (1)
GitHub Actions
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-01-27
    Pull request: opened by its own account
    Commits: 50 by its own account
  • Claude Codefirst seen 2026-03-25
    Pull request it wrote: opened by a project member
    Commits: at least 4 crediting it in the message
Models named in its commits
  • Claude Opus 4.64 commits · Mar to May 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
11 external dependencies (excludes base and recommended)

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.

Depends (0)
none
LinkingTo (2)
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (3)
Author, Maintainer since 1.0 (2026)
Author
Releases (3)

Pick two releases to compare their code metrics.

  • 2.0.0Latest
    record
    2026-08-23 · current release · diff ↗ ·
    added 2 exports
    get_tree, plot_loss_heatmap
  • 1.0.1
    record
    2026-05-04 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 1.0
    record
    2026-03-16
  • R
    R 4.5.0 released · 2025-04-11

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")
Jiang, Z., He, S., & Zhang, D. (2026). qshap: Fast Calculation of Feature Contributions in Boosting Trees (Version 2.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for qshap version 2.0.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy