Package: rollshap 1.0.2
rollshap: Rolling Shapley Values
Analytical computation of rolling and expanding Shapley values for time-series data. The 'rollshap' package decomposes the coefficient of determination (R-squared) of a linear regression into nonnegative contributions from each explanatory variable using the Shapley value from cooperative game theory (Shapley, 1953, <doi:10.1515/9781400881970-018>). For each window, the exact Shapley value is computed by fitting all subsets of the explanatory variables and averaging the marginal contribution to R-squared across all orderings, which returns an order-invariant attribution that sums to the full-model R-squared. Use cases include variable importance, factor attribution, and feature selection in time-series regression. The package supports rolling and expanding windows, weights, and handling of missing values via the min_obs, complete_obs, and na_restore arguments. The implementation uses the online and offline algorithms from the 'roll' package to compute rolling and expanding cross-products efficiently, with parallelism across columns and windows provided by 'RcppParallel'.
Authors:
rollshap_1.0.2.tar.gz
rollshap_1.0.2.zip(r-4.7-x86_64)rollshap_1.0.2.zip(r-4.7-arm64)rollshap_1.0.2.zip(r-4.6-x86_64)rollshap_1.0.2.zip(r-4.6-arm64)rollshap_1.0.2.zip(r-4.5-x86_64)
rollshap_1.0.2.tgz(r-4.6-x86_64)rollshap_1.0.2.tgz(r-4.6-arm64)rollshap_1.0.2.tgz(r-4.5-x86_64)rollshap_1.0.2.tgz(r-4.5-arm64)
rollshap_1.0.2.tar.gz(r-4.7-arm64)rollshap_1.0.2.tar.gz(r-4.7-x86_64)rollshap_1.0.2.tar.gz(r-4.6-arm64)rollshap_1.0.2.tar.gz(r-4.6-x86_64)
rollshap_1.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
rollshap/json (API)
| # Install 'rollshap' in R: |
| install.packages('rollshap', repos = c('https://jasonjfoster.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/jasonjfoster/rollshap/issues
algorithmsrcppshapleyopenblascppopenmp
Last updated from:fe5a22e3cf. Checks:15 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 122 | ||
| linux-devel-x86_64 | OK | 152 | ||
| source / vignettes | OK | 217 | ||
| linux-release-arm64 | OK | 129 | ||
| linux-release-x86_64 | OK | 149 | ||
| macos-release-arm64 | OK | 121 | ||
| macos-release-x86_64 | OK | 269 | ||
| macos-oldrel-arm64 | OK | 104 | ||
| macos-oldrel-x86_64 | OK | 337 | ||
| windows-devel-arm64 | OK | 222 | ||
| windows-devel-x86_64 | OK | 155 | ||
| windows-release-arm64 | OK | 195 | ||
| windows-release-x86_64 | OK | 118 | ||
| windows-oldrel-x86_64 | OK | 106 | ||
| wasm-release | OK | 117 |
Exports:roll_shap
Dependencies:RcppRcppArmadilloRcppParallelroll
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Rolling Shapley Values | rollshap-package rollshap |
| Rolling Shapley Values | roll_shap |