Skip to content

Commit

Permalink
Merge pull request #736 from imbs-hl/fix_poisson_test
Browse files Browse the repository at this point in the history
use same seed in poisson test
  • Loading branch information
mnwright authored Aug 13, 2024
2 parents cf04d08 + 1ad201a commit de75150
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_poissonsplit.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ test_that("poisson splitting works on poisson distributed data", {
n_test = (max(n_train)+1):n
df_train = df[n_train, ]
df_test = df[n_test, ]
rf_poi <- ranger(y ~ ., df_train, splitrule = "poisson", num.trees = 50, min.node.size = 50, poisson.tau = 1, seed = 12)
rf_mse <- ranger(y ~ ., df_train, splitrule = "variance", num.trees = 50, min.node.size = 50, seed = 13)
rf_poi <- ranger(y ~ ., df_train, splitrule = "poisson", num.trees = 50, min.node.size = 50, poisson.tau = 1, seed = 123)
rf_mse <- ranger(y ~ ., df_train, splitrule = "variance", num.trees = 50, min.node.size = 50, seed = 123)

expect_is(rf_poi, "ranger")
# deviance on test set
Expand Down

0 comments on commit de75150

Please sign in to comment.