Skip to content

Commit 885a27b

Browse files
authored
Update surv_shap.R
1 parent a3a8311 commit 885a27b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/surv_shap.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ use_treeshap <- function(explainer, new_observation, ...){
318318
lapply(
319319
tmp_unified,
320320
function(m) {
321-
new_obs_mat <- as.matrix(new_observation[as.integer(i), ])
321+
new_obs_mat <- new_observation[as.integer(i), ]
322322
# ensure that matrix has expected dimensions; as.integer is
323323
# necessary for valid comparison with "identical"
324324
stopifnot(identical(dim(new_obs_mat), as.integer(c(1L, ncol(new_observation)))))

0 commit comments

Comments
 (0)