Skip to content

Commit 8e4c726

Browse files
authored
Merge pull request #132 from ModelOriented/cran-1
CRAN Release
2 parents 1e39218 + b97d7a9 commit 8e4c726

18 files changed

+41
-101
lines changed

CRAN-SUBMISSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 0.9.2
2-
Date: 2023-10-14 16:44:29 UTC
3-
SHA: 1d239694c309c6b48168b2ca19b8fd5c8d6f1d2d
1+
Version: 0.9.3
2+
Date: 2024-01-12 11:21:47 UTC
3+
SHA: d2f329e540177df778e787a27dec50d34cb5ed5c

R/shapviz.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ shapviz.matrix = function(object, X, baseline = 0, collapse = NULL,
111111
#' Creates a "shapviz" object from an XGBoost model.
112112
#' @export
113113
#' @examples
114-
#' \dontrun{
115114
#' # XGBoost models
116115
#' X_pred <- data.matrix(iris[, -1])
117116
#' dtrain <- xgboost::xgb.DMatrix(X_pred, label = iris[, 1], nthread = 1)
@@ -184,7 +183,6 @@ shapviz.matrix = function(object, X, baseline = 0, collapse = NULL,
184183
#' mx
185184
#' all.equal(mx[[3]], x)
186185
#' }
187-
#' }
188186
shapviz.xgb.Booster = function(object, X_pred, X = X_pred, which_class = NULL,
189187
collapse = NULL, interactions = FALSE, ...) {
190188
stopifnot(

R/sv_dependence.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#' @param ... Arguments passed to [ggplot2::geom_jitter()].
4040
#' @returns An object of class "ggplot" (or "patchwork") representing a dependence plot.
4141
#' @examples
42-
#' \dontrun{
4342
#' dtrain <- xgboost::xgb.DMatrix(
4443
#' data.matrix(iris[, -1]), label = iris[, 1], nthread = 1
4544
#' )
@@ -57,7 +56,6 @@
5756
#' sv_dependence(
5857
#' x2, c("Petal.Length", "Species"), color_var = NULL, interactions = TRUE
5958
#' )
60-
#' }
6159
#' @export
6260
#' @seealso [potential_interactions()]
6361
sv_dependence <- function(object, ...) {

R/sv_dependence2D.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#' @param ... Arguments passed to [ggplot2::geom_jitter()].
3030
#' @returns An object of class "ggplot" (or "patchwork") representing a dependence plot.
3131
#' @examples
32-
#' \dontrun{
3332
#' dtrain <- xgboost::xgb.DMatrix(
3433
#' data.matrix(iris[, -1]), label = iris[, 1], nthread = 1
3534
#' )
@@ -48,7 +47,6 @@
4847
#' # mshapviz object
4948
#' mx <- split(sv, f = iris$Species)
5049
#' sv_dependence2D(mx, x = "Petal.Length", y = "Sepal.Width")
51-
#' }
5250
#' @export
5351
#' @seealso [sv_dependence()]
5452
sv_dependence2D <- function(object, ...) {

R/sv_force.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#' (via [ggrepel::geom_text_repel()]).
1212
#' @returns An object of class "ggplot" (or "patchwork") representing a force plot.
1313
#' @examples
14-
#' \dontrun{
1514
#' dtrain <- xgboost::xgb.DMatrix(
1615
#' data.matrix(iris[, -1]), label = iris[, 1], nthread = 1
1716
#' )
@@ -22,7 +21,6 @@
2221
#'
2322
#' # Aggregate over all observations with Petal.Length == 1.4
2423
#' sv_force(x, row_id = x$X$Petal.Length == 1.4)
25-
#' }
2624
#' @export
2725
#' @seealso [sv_waterfall()]
2826
sv_force <- function(object, ...) {

R/sv_importance.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,13 @@
4646
#' `kind = "no"` - a named numeric vector of sorted SHAP feature importances
4747
#' (or a matrix in case of an object of class "mshapviz").
4848
#' @examples
49-
#' \dontrun{
5049
#' X_train <- data.matrix(iris[, -1])
5150
#' dtrain <- xgboost::xgb.DMatrix(X_train, label = iris[, 1], nthread = 1)
5251
#' fit <- xgboost::xgb.train(data = dtrain, nrounds = 10, nthread = 1)
5352
#' x <- shapviz(fit, X_pred = X_train)
5453
#' sv_importance(x)
5554
#' sv_importance(x, kind = "no")
5655
#' sv_importance(x, kind = "beeswarm", show_numbers = TRUE)
57-
#' }
58-
#'
5956
#' @seealso \code{\link{sv_interaction}}
6057
#' @export
6158
sv_importance <- function(object, ...) {

R/sv_interaction.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@
1818
#' numeric matrix of average absolute SHAP interactions sorted by the average
1919
#' absolute SHAP values (or a list of such matrices in case of "mshapviz" object).
2020
#' @examples
21-
#' \dontrun{
2221
#' dtrain <- xgboost::xgb.DMatrix(
2322
#' data.matrix(iris[, -1]), label = iris[, 1], nthread = 1
2423
#' )
2524
#' fit <- xgboost::xgb.train(data = dtrain, nrounds = 10, nthread = 1)
2625
#' x <- shapviz(fit, X_pred = dtrain, X = iris, interactions = TRUE)
2726
#' sv_interaction(x, kind = "no")
2827
#' sv_interaction(x, max_display = 2, size = 3)
29-
#' }
3028
#' @seealso [sv_importance()]
3129
#' @export
3230
sv_interaction <- function(object, ...) {

R/sv_waterfall.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#' will altogether suppress adding text to the bars.
3636
#' @returns An object of class "ggplot" (or "patchwork") representing a waterfall plot.
3737
#' @examples
38-
#' \dontrun{
3938
#' dtrain <- xgboost::xgb.DMatrix(
4039
#' data.matrix(iris[, -1]), label = iris[, 1], nthread = 1
4140
#' )
@@ -51,7 +50,6 @@
5150
#'
5251
#' # Aggregate over all observations with Petal.Length == 1.4
5352
#' sv_waterfall(x, row_id = x$X$Petal.Length == 1.4)
54-
#' }
5553
#' @export
5654
#' @seealso [sv_force()]
5755
sv_waterfall <- function(object, ...) {

cran-comments.md

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,29 @@
1-
# shapviz 0.9.2
1+
# shapviz 0.9.3
22

3-
## Resubmission 7
3+
Hi CRAN team
44

5-
No effect of setDTthreads(2). Commenting out now all tests with xgboost.
6-
7-
## Resubmission 6
8-
9-
Test timing not fixed, still. Now testing to import {data.table} and setDTthreads(2) pre checks.
10-
11-
## Resubmission 5
12-
13-
Now trying
14-
15-
Sys.setenv(DT_NUM_THREADS = 1)
16-
Sys.setenv("TESTTHAT_CPUS" = 1)
17-
options(Ncpus = 1)
18-
19-
20-
## Resubmission 4
21-
22-
Trying to set Sys.setenv(DT_NUM_THREADS = 2) in the unit tests to fix the crazy Debian behaviour.
23-
24-
## Resubmission 3
25-
26-
Moving one single nthread = 1 into param = list(). Setting nrounds = 1 in all tests. If this does not help, I will need to delete most unit tests.
27-
28-
## Resubmission 2
29-
30-
Setting nthread = 1 in unit tests and vignettes. Hope this fixes the problems.
31-
32-
## Resubmission 1
33-
34-
Fixing problems with curly braces in .rd files.
35-
36-
### Original message
37-
38-
Hello CRAN team
39-
40-
{shapviz} already got 2 reverse dependencies, which look okay.
41-
42-
The update has mainly added more flexibility of the importance plots for multi-output models.
5+
This is a relatively small update, but offers much more flexibility in the interaction heuristic.
436

447
## Checks look good
458

469
### check(manual = TRUE, cran = TRUE)
4710

48-
- checking HTML version of manual ... NOTE
49-
Skipping checking HTML validation: no command 'tidy' found
11+
Ok
5012

5113
### RHub (usual notes)
5214

5315
* checking package dependencies ... NOTE
5416
Packages which this enhances but not available for checking:
5517
'fastshap', 'h2o', 'lightgbm'
5618
* checking HTML version of manual ... NOTE
57-
Skipping checking HTML validation: no command 'tidy' found
5819
Skipping checking math rendering: package 'V8' unavailable
20+
* checking for non-standard things in the check directory ... NOTE
21+
Found the following files/directories:
22+
''NULL''
23+
* checking for detritus in the temp directory ... NOTE
24+
Found the following files/directories:
25+
'lastMiKTeXException'
26+
5927

6028
### Winbuilder()
6129

man/shapviz.Rd

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)