Skip to content

Commit

Permalink
cover check and give vs more trees
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Oct 8, 2023
1 parent 785a83a commit 1f5a78f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ test_that(
desc = 'errors trigger on cue',
code = {

expect_error(
check_arg_uni(uni = c('a', 'b', 'd'),
arg_name = 'ok',
expected_uni = c('a', 'b', 'c')),
regexp = 'should contain'
)

expect_error(
check_arg_is_integer(arg_name = 'x',
arg_value = c(1, 2, 3.3)),
Expand Down
9 changes: 7 additions & 2 deletions tests/testthat/test-orsf_vs.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


test_that(
desc = "variable selection filters junk preds",
code = {
Expand All @@ -10,10 +9,16 @@ test_that(

junk_names <- paste("junk", seq(n_junk_preds), sep ='_')

set.seed(329)

for(i in junk_names)
pbc_with_junk[[i]] <- rnorm(nrow(pbc))

fit <- orsf(pbc_with_junk, time + status ~ ., n_tree = 50)
fit <- orsf(pbc_with_junk,
time + status ~ .,
n_tree = 75,
importance = 'permute',
tree_seeds = seeds_standard)

fit_var_select <- orsf_vs(fit, n_predictor_min = 10)

Expand Down

0 comments on commit 1f5a78f

Please sign in to comment.