Skip to content

Commit

Permalink
fix: ranger parameters (#277)
Browse files Browse the repository at this point in the history
* fix: ignore time.interest parameter

* feat: add node.stats parameter

* fix: minprop
  • Loading branch information
be-marc authored Nov 17, 2023
1 parent 5d5ecb7 commit 1a4d571
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/LearnerClassifRanger.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ LearnerClassifRanger = R6Class("LearnerClassifRanger",
max.depth = p_int(default = NULL, lower = 0L, special_vals = list(NULL), tags = "train"),
min.bucket = p_int(1L, default = 1L, tags = "train"),
min.node.size = p_int(1L, default = NULL, special_vals = list(NULL), tags = "train"),
min.prop = p_dbl(default = 0.1, tags = "train"),
minprop = p_dbl(default = 0.1, tags = "train"),
mtry = p_int(lower = 1L, special_vals = list(NULL), tags = "train"),
mtry.ratio = p_dbl(lower = 0, upper = 1, tags = "train"),
node.stats = p_lgl(default = FALSE, tags = "train"),
num.random.splits = p_int(1L, default = 1L, tags = "train"),
num.threads = p_int(1L, default = 1L, tags = c("train", "predict", "threads")),
num.trees = p_int(1L, default = 500L, tags = c("train", "predict", "hotstart")),
Expand Down
2 changes: 1 addition & 1 deletion R/LearnerRegrRanger.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ LearnerRegrRanger = R6Class("LearnerRegrRanger",
max.depth = p_int(default = NULL, lower = 0L, special_vals = list(NULL), tags = "train"),
min.bucket = p_int(1L, default = 1L, tags = "train"),
min.node.size = p_int(1L, default = 5L, special_vals = list(NULL), tags = "train"),
min.prop = p_dbl(default = 0.1, tags = "train"),
minprop = p_dbl(default = 0.1, tags = "train"),
mtry = p_int(lower = 1L, special_vals = list(NULL), tags = "train"),
mtry.ratio = p_dbl(lower = 0, upper = 1, tags = "train"),
node.stats = p_lgl(default = FALSE, tags = "train"),
num.random.splits = p_int(1L, default = 1L, tags = "train"),
num.threads = p_int(1L, default = 1L, tags = c("train", "predict", "threads")),
num.trees = p_int(1L, default = 500L, tags = c("train", "predict", "hotstart")),
Expand Down
2 changes: 1 addition & 1 deletion inst/paramtest/test_paramtest_classif.ranger.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_that("classif.ranger", {
"status.variable.name", # handled via mlr3
"classification", # handled via mlr3
"mtry.ratio", # custom hyperpar
"min.prop" # renamed to minprop in upstream package
"time.interest" # survival only
)

ParamTest = run_paramtest(learner, fun, exclude, tag = "train")
Expand Down
2 changes: 1 addition & 1 deletion inst/paramtest/test_paramtest_regr.ranger.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test_that("regr.ranger", {
"status.variable.name", # handled via mlr3
"classification", # handled via mlr3
"mtry.ratio", # custom hyperpar
"min.prop" # renamed to minprop in upstream package
"time.interest" # survival only
)

ParamTest = run_paramtest(learner, fun, exclude, tag = "train")
Expand Down

0 comments on commit 1a4d571

Please sign in to comment.