Skip to content

Commit 140eba3

Browse files
authored
fix: randomForest feature types
1 parent 390f239 commit 140eba3

8 files changed

+16
-11
lines changed

.github/workflows/rcmdcheck.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Install pak and query dependencies
4141
run: |
42-
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
42+
install.packages("pak")
4343
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
4444
shell: Rscript {0}
4545

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: mlr3extralearners
22
Title: Extra Learners For mlr3
3-
Version: 0.5.48-9000
3+
Version: 0.5.49
44
Authors@R: c(
55
person("Raphael", "Sonabend", , "[email protected]", role = "aut",
66
comment = c(ORCID = "0000-0001-9225-4654")),

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# mlr3extralearners 0.5.49
2+
3+
* Added missing feature type `"integer"` to `classif.randomForest`
4+
* Added missing feature type `"logical"` to {classif, regr}.randomForest
5+
16
# mlr3extralearners 0.5.48
27

38
* Add rsm learner

R/learner_obliqueRSF_surv_obliqueRSF.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ delayedAssign(
3636
#' Creates a new instance of this [R6][R6::R6Class] class.
3737
initialize = function() {
3838

39-
warning("obliqueRSF has been superseded by aorsf. We highly recommend you use aorsf to fit oblique random survival forests: see https://github.com/bcjaeger/aorsf or install from CRAN with install.packages('aorsf')",
39+
messagef("obliqueRSF has been superseded by aorsf. We highly recommend you use aorsf to fit oblique random survival forests: see https://github.com/bcjaeger/aorsf or install from CRAN with install.packages('aorsf')",
4040
call. = FALSE)
4141

4242
ps = ps(

R/learner_randomForest_classif_randomForest.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ LearnerClassifRandomForest = R6Class("LearnerClassifRandomForest",
3535
tags = "train"),
3636
maxnodes = p_int(lower = 1L, tags = "train"),
3737
importance = p_fct(default = FALSE,
38-
levels = c("accuracy", "gini", "none", FALSE),
38+
levels = c("accuracy", "gini", "none"),
3939
special_vals = list(FALSE),
4040
tags = "train"),
4141
localImp = p_lgl(default = FALSE, tags = "train"),
@@ -52,7 +52,7 @@ LearnerClassifRandomForest = R6Class("LearnerClassifRandomForest",
5252
super$initialize(
5353
id = "classif.randomForest",
5454
packages = c("mlr3extralearners", "randomForest"),
55-
feature_types = c("numeric", "factor", "ordered"),
55+
feature_types = c("integer", "numeric", "factor", "ordered", "logical"),
5656
predict_types = c("response", "prob"),
5757
param_set = ps,
5858
properties = c("weights", "twoclass", "multiclass", "importance", "oob_error"),

R/learner_randomForest_regr_randomForest.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ LearnerRegrRandomForest = R6Class("LearnerRegrRandomForest",
3434
tags = "train"),
3535
maxnodes = p_int(lower = 1L, tags = "train"),
3636
importance = p_fct(default = FALSE,
37-
levels = c("mse", "nudepurity", "none", FALSE),
37+
levels = c("mse", "nudepurity", "none"),
3838
special_vals = list(FALSE),
3939
tags = "train"),
4040
localImp = p_lgl(default = FALSE, tags = "train"),
@@ -51,7 +51,7 @@ LearnerRegrRandomForest = R6Class("LearnerRegrRandomForest",
5151
super$initialize(
5252
id = "regr.randomForest",
5353
packages = c("mlr3extralearners", "randomForest"),
54-
feature_types = c("integer", "numeric", "factor", "ordered"),
54+
feature_types = c("integer", "numeric", "factor", "ordered", "logical"),
5555
predict_types = c("response"),
5656
param_set = ps,
5757
properties = c("weights", "importance", "oob_error"),

man/mlr_learners_classif.randomForest.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mlr_learners_regr.randomForest.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)