diff --git a/DESCRIPTION b/DESCRIPTION index 555ee01f..99b97863 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -64,4 +64,4 @@ Config/testthat/edition: 3 Config/testthat/parallel: true Encoding: UTF-8 Roxygen: list(markdown = TRUE, r6 = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/R/Shapley.R b/R/Shapley.R index 8c7a182c..6dac1579 100644 --- a/R/Shapley.R +++ b/R/Shapley.R @@ -75,6 +75,7 @@ Shapley <- R6Class("Shapley", #' [data.frame] with the Shapley values (phi) per feature. initialize = function(predictor, x.interest = NULL, sample.size = 100) { checkmate::assert_data_frame(x.interest, null.ok = TRUE) + x.interest = as.data.frame(x.interest) super$initialize(predictor = predictor) x.interest <- x.interest[setdiff(colnames(x.interest), predictor$data$y.names)] self$sample.size <- sample.size diff --git a/man/calculate.ale.cat.Rd b/man/calculate.ale.cat.Rd index 556e8d1c..c681a5a6 100644 --- a/man/calculate.ale.cat.Rd +++ b/man/calculate.ale.cat.Rd @@ -4,7 +4,7 @@ \alias{calculate.ale.cat} \title{Compute ALE for 1 categorical feature} \usage{ -\method{calculate}{ale.cat}(dat, run.prediction, feature.name) +calculate.ale.cat(dat, run.prediction, feature.name) } \arguments{ \item{dat}{the data.frame with same columns as training data} diff --git a/man/calculate.ale.num.Rd b/man/calculate.ale.num.Rd index 951bf6d1..5cc36887 100644 --- a/man/calculate.ale.num.Rd +++ b/man/calculate.ale.num.Rd @@ -4,7 +4,7 @@ \alias{calculate.ale.num} \title{Compute ALE for 1 numerical feature} \usage{ -\method{calculate}{ale.num}(dat, run.prediction, feature.name, grid.dt) +calculate.ale.num(dat, run.prediction, feature.name, grid.dt) } \arguments{ \item{dat}{the data.frame with same columns as training data} diff --git a/man/calculate.ale.num.cat.Rd b/man/calculate.ale.num.cat.Rd index 109f4cec..c79e3092 100644 --- a/man/calculate.ale.num.cat.Rd +++ b/man/calculate.ale.num.cat.Rd @@ -4,7 +4,7 @@ \alias{calculate.ale.num.cat} \title{Compute ALE for 2 features, one numerical, one categorical} \usage{ -\method{calculate}{ale.num.cat}(dat, run.prediction, feature.name, grid.dt) +calculate.ale.num.cat(dat, run.prediction, feature.name, grid.dt) } \arguments{ \item{dat}{the data.frame with same columns as training data} diff --git a/man/calculate.ale.num.num.Rd b/man/calculate.ale.num.num.Rd index e93374ec..389bf0e3 100644 --- a/man/calculate.ale.num.num.Rd +++ b/man/calculate.ale.num.num.Rd @@ -4,7 +4,7 @@ \alias{calculate.ale.num.num} \title{Compute ALE for 2 numerical features} \usage{ -\method{calculate}{ale.num.num}(dat, run.prediction, feature.name, grid.dt1, grid.dt2) +calculate.ale.num.num(dat, run.prediction, feature.name, grid.dt1, grid.dt2) } \arguments{ \item{dat}{the data.frame with same columns as training data} diff --git a/man/extract.glmnet.effects.Rd b/man/extract.glmnet.effects.Rd index 505e66ce..68c506f3 100644 --- a/man/extract.glmnet.effects.Rd +++ b/man/extract.glmnet.effects.Rd @@ -4,7 +4,7 @@ \alias{extract.glmnet.effects} \title{Extract glmnet effects} \usage{ -\method{extract}{glmnet.effects}(betas, best.index, x.recoded, x.original) +extract.glmnet.effects(betas, best.index, x.recoded, x.original) } \arguments{ \item{betas}{glmnet$beta}