Skip to content

Commit

Permalink
use same seed in poisson test
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Aug 13, 2024
1 parent 810e387 commit 1ad201a
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 1ad201a

Please sign in to comment.