Skip to content

Commit

Permalink
Release v 1.0.2 to CRAN (#439)
Browse files Browse the repository at this point in the history
[Merging despite problem with the new torch version found after CRAN release. Will have to deal with that to get vaeac up running.]
  • Loading branch information
martinju authored Feb 9, 2025
1 parent c30ecf3 commit 8f55367
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 48 deletions.
3 changes: 1 addition & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
^\.lintr$
^\.covrignore$
^LICENSE\.md$
inst/compare_lundberg\.xgb\.obj
^\.github$
^CODE_OF_CONDUCT\.md$
^cran-comments\.md$
Expand All @@ -31,7 +30,7 @@ inst/compare_lundberg\.xgb\.obj
^vignettes/cache_vaeac/*$
^vignettes/cache_regression/*$
^vignettes/cache_asymmetric_causal/*$
#^tests/testthat/_snaps/*$ # Uncomment when submitting to CRAN to reduce filesize
^tests/testthat/_snaps/*$ # Uncomment when submitting to CRAN to reduce filesize
^inst/code_paper/*$
^inst/joss_paper/*$

Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: shapr
Version: 1.0.1.9000
Version: 1.0.2.9000
Title: Prediction Explanation with Dependence-Aware Shapley Values
Description: Complex machine learning models are often hard to interpret. However, in
many situations it is crucial to understand and explain why a model made a specific
Expand Down Expand Up @@ -30,7 +30,7 @@ RoxygenNote: 7.3.2
Depends: R (>= 3.5.0)
Imports:
stats,
data.table,
data.table (>= 1.15.0),
Rcpp (>= 0.12.15),
Matrix,
future.apply,
Expand Down
49 changes: 30 additions & 19 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
# shapr (development version)
# shapr 1.0.2

* Fix CRAN NOTE which turned out to be bug related to returning NULL rather than integer(0) to identify (unconditional)
asymmetric causal sampling [#435](https://github.com/NorskRegnesentral/shapr/pull/435)
asymmetric causal sampling ([#435](https://github.com/NorskRegnesentral/shapr/pull/435))
* [Py] Get 'shaprpy' up to speed with the latest 'shapr' version and return the internal list properly
([#436](https://github.com/NorskRegnesentral/shapr/pull/436))
* Allow manual groups in `explain_forecast()` ([#433](https://github.com/NorskRegnesentral/shapr/pull/433))
* Minor updates to readme and pkgdown site after CRAN release of shapr 1.0.1
([#437](https://github.com/NorskRegnesentral/shapr/pull/437),
[#438](https://github.com/NorskRegnesentral/shapr/pull/438))
* Require data.table >= 1.15.0 to allow uniform usage of `by=.I`
([#434](https://github.com/NorskRegnesentral/shapr/issues/434))
* Minor doc edits ([#439](https://github.com/NorskRegnesentral/shapr/issues/439))



# shapr 1.0.1

* Spelling checking and other minor clean up [#431](https://github.com/NorskRegnesentral/shapr/pull/431))
* Add extra_computation_args and output_args to explain_forecast() [#428](https://github.com/NorskRegnesentral/shapr/pull/428))
* Rename vaeac plotting functions [#428](https://github.com/NorskRegnesentral/shapr/pull/428))
* Move explain() arguments `paired_shap_sampling` and `kernelSHAP_reweighting` into `extra_computation_args` [#428](https://github.com/NorskRegnesentral/shapr/pull/428))
* Improved and unified the documentation [#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Remove seed argument from the boostrap function as its better handled by the mother function [#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Renamed various internal functions to be consistent with names in the rest of the package [#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Remove MSEv from explain_forecast (as it was only supported for horizon=1). Should return in a more general manner in the future [#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Improve efficiency of coalition sampling code and move to string sampling [#426](https://github.com/NorskRegnesentral/shapr/pull/426))
* Bugfix `iterative = TRUE` for `explain_forecast()` which was not using coalitions from previous iterations [#426](https://github.com/NorskRegnesentral/shapr/pull/426))
* Bugfix the handling and output with the `verbose` argument for `explain_forecast()` [#425](https://github.com/NorskRegnesentral/shapr/pull/425))
* Improved flexibility of the beeswarm plot functionality [#424](https://github.com/NorskRegnesentral/shapr/pull/424))
* Bugfix edge case where the `party` package returns a `constparty` object [#423](https://github.com/NorskRegnesentral/shapr/pull/423))
* Bugfix error due to extra comma in rarely used warning [#422](https://github.com/NorskRegnesentral/shapr/pull/422))
* Shined up the vignettes a bit [#421](https://github.com/NorskRegnesentral/shapr/pull/421))
* Bugfix `keep_samp_for_vS` with iterative approach [#417](https://github.com/NorskRegnesentral/shapr/pull/417))
* [Python] Brought the python code base up to speed with essentially all functionality in `explain()` in R [#416](https://github.com/NorskRegnesentral/shapr/pull/416))
* Spelling checking and other minor clean up ([#431](https://github.com/NorskRegnesentral/shapr/pull/431))
* Add extra_computation_args and output_args to explain_forecast() ([#428](https://github.com/NorskRegnesentral/shapr/pull/428))
* Rename vaeac plotting functions ([#428](https://github.com/NorskRegnesentral/shapr/pull/428))
* Move explain() arguments `paired_shap_sampling` and `kernelSHAP_reweighting` into `extra_computation_args` ([#428](https://github.com/NorskRegnesentral/shapr/pull/428))
* Improved and unified the documentation ([#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Remove seed argument from the boostrap function as its better handled by the mother function ([#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Renamed various internal functions to be consistent with names in the rest of the package ([#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Remove MSEv from explain_forecast (as it was only supported for horizon=1). Should return in a more general manner in the future ([#427](https://github.com/NorskRegnesentral/shapr/pull/427))
* Improve efficiency of coalition sampling code and move to string sampling ([#426](https://github.com/NorskRegnesentral/shapr/pull/426))
* Bugfix `iterative = TRUE` for `explain_forecast()` which was not using coalitions from previous iterations ([#426](https://github.com/NorskRegnesentral/shapr/pull/426))
* Bugfix the handling and output with the `verbose` argument for `explain_forecast()` ([#425](https://github.com/NorskRegnesentral/shapr/pull/425))
* Improved flexibility of the beeswarm plot functionality ([#424](https://github.com/NorskRegnesentral/shapr/pull/424))
* Bugfix edge case where the `party` package returns a `constparty` object ([#423](https://github.com/NorskRegnesentral/shapr/pull/423))
* Bugfix error due to extra comma in rarely used warning ([#422](https://github.com/NorskRegnesentral/shapr/pull/422))
* Shined up the vignettes a bit ([#421](https://github.com/NorskRegnesentral/shapr/pull/421))
* Bugfix `keep_samp_for_vS` with iterative approach ([#417](https://github.com/NorskRegnesentral/shapr/pull/417))
* [Python] Brought the python code base up to speed with essentially all functionality in `explain()` in R ([#416](https://github.com/NorskRegnesentral/shapr/pull/416))
* Please CRAN with dontrun on long running examples + skip_on_cran for the parallelized tests.

# shapr 1.0.0 (GitHub only)
Expand Down
2 changes: 1 addition & 1 deletion R/approach.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' The different choices of `approach` take different (optional) parameters,
#' which are forwarded from [explain()].
#' See the \href{https://norskregnesentral.github.io/shapr/articles/general_usage.html}{general usage}
#' See the \href{https://norskregnesentral.github.io/shapr/articles/general_usage.html}{general usage vignette}
#' for more information about the different approaches.
#'
#' @param ... Arguments passed to specific classes. See below
Expand Down
4 changes: 2 additions & 2 deletions R/explain.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
#' then the function will use the previous object to continue the computation.
#' This is useful if the computation is interrupted or you want higher accuracy than already obtained, and therefore
#' want to continue the iterative estimation. See the
#' \href{https://norskregnesentral.github.io/shapr/articles/general_usage.html}{general usage} for examples.
#' \href{https://norskregnesentral.github.io/shapr/articles/general_usage.html}{general usage vignette} for examples.
#'
#' @param asymmetric Logical.
#' Not applicable for (regular) non-causal or asymmetric explanations.
Expand Down Expand Up @@ -183,7 +183,7 @@
#' @details The `shapr` package implements kernelSHAP estimation of dependence-aware Shapley values with
#' eight different Monte Carlo-based approaches for estimating the conditional distributions of the data.
#' These are all introduced in the
#' \href{https://norskregnesentral.github.io/shapr/articles/general_usage.html}{general usage}.
#' \href{https://norskregnesentral.github.io/shapr/articles/general_usage.html}{general usage vignette}.
#' (From R: `vignette("general_usage", package = "shapr")`).
#' Moreover,
#' \href{https://martinjullum.com/publication/aas-2021-explaining/aas-2021-explaining.pdf}{Aas et al. (2021)}
Expand Down
43 changes: 25 additions & 18 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# shapr 1.0.1 (Major release)
# shapr 1.0.2 (Patch release)

* **By CRAN request** after initial submission:
* Fixed spelling in DESCRIPTION
* Reduced tarball size mainly by (temporary) removing snapshot files from the build as they are not run on CRAN.
* (Resubmission of exactly the same package as submitted Jan 22nd. During check
there seemed to be installation issues with the dials and rsample package (unrelated to my package).
Unfortunately my emails commenting on this seems to have not reached the CRAN team, which unfortunately removed shapr 1.0.1.
on CRAN. See below for original patch release comments.)

* Complete rewrite of the package compared to the previous CRAN release. We moved from two main user functions
`shapr()` and `explain()` to a single function `explain()` that includes both.
Thus, this change breaks essentially all existing code that uses the previous version of the package.
* A comprehensive list of changes and new functionality can be found in the NEWS.md file.
* We deem the package fully mature at this stage, and therefore release it as a stable, major version.
* Fix test error in prepare_data_gaussian_cpp seen on clang-UBSAN gcc-UBSAN compliers in CRAN checks.
Turned out to be an actual bug for an edge case.
* Other minor fixes to GH repo, pkgdown site, python wrapper ++ unrelated to the actual shapr CRAN package.
See NEWS.md for details.

## Test environments

Expand All @@ -19,17 +19,18 @@ The win-builder and R-hub tests are run without snapshots tests (to replicate CR
* GHA (ubuntu-latest), R-version: devel, release, oldrel-1, oldrel-2
* GHA (windows-latest), R-version: release
* GHA (macOS-latest), R-version: release
* win-builder, R-versions: devel, release, oldrelease
* devtools-win-builder, R-versions: devel, release, oldrelease
* devools-mac-builder, R-versions: release
* R-hub (ubuntu-latest): R-version: devel
* R-hub (macos-13): R-version: devel
* R-hub (macos-latest): R-version: devel
* R-hub (windows-latest): R-version: devel
* R-hub (clang-asan): R-version: devel


## R CMD check results

There were no ERRORs, WARNINGs

There were 1 NOTE
There were in total 2 NOTES

### NOTE (multiple platforms):

Expand All @@ -41,13 +42,21 @@ There were 1 NOTE

> The package is growing in size, uses more complied code, and the documentation is comprehensive.
### NOTE (win-builder):

* checking CRAN incoming feasibility ... [20s] NOTE
Maintainer: 'Martin Jullum <[email protected]>'

Days since last update: 6

> Correct. I was required to fix the issue by the CRAN team.
## Downstream dependencies
There is 2 downstream dependency (`PPtreeregViz`, `SEMdeep`) of `shapr`.
In addition, the package `shapviz` provides additional plotting functionality without stating an explicit dependency
(I believe shapr actually should have be listed under Suggests?)

The 3 packages fails on R CMD checks, but I have submitted PRs to fix all issues.
The 2 packages fails on R CMD checks, but I have submitted PRs to fix them.

### PPtreeregViz

Expand All @@ -61,7 +70,5 @@ There has been no reaction from the maintainer.

### shapviz

* Nov 15th 2024 I submitted a PR fixing the issue: https://github.com/ModelOriented/shapviz/pull/162
The PR was merged to the GitHub version of `shapviz` on Nov 16th 2024.
The CRAN version has naturally not been updated yet.
I will notify the maintainer of `shapvix` when the new version of `shapr` is released on CRAN.
*Passes the checks

4 changes: 2 additions & 2 deletions man/explain.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/setup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/setup_approach.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f55367

Please sign in to comment.