Random classification forest.
Calls ranger::ranger() from package ranger.
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():
mlr_learners$get("classif.ranger") lrn("classif.ranger")
Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5--32. ISSN 1573-0565, doi: 10.1023/A:1010933404324 . Wright, N. M, Ziegler, Andreas (2017). “ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and R.” Journal of Statistical Software, 77(1), 1--17. doi: 10.18637/jss.v077.i01 .
mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger
new()Creates a new instance of this R6 class.
LearnerClassifRanger$new()
importance()The importance scores are extracted from the model slot variable.importance.
Parameter importance.mode must be set to "impurity", "impurity_corrected", or
"permutation"
LearnerClassifRanger$importance()
Named numeric().
oob_error()The out-of-bag error, extracted from model slot prediction.error.
LearnerClassifRanger$oob_error()
clone()The objects of this class are cloneable with this method.
LearnerClassifRanger$clone(deep = FALSE)
deepWhether to make a deep clone.
if (requireNamespace("ranger")) { learner = mlr3::lrn("classif.ranger") print(learner) # available parameters: learner$param_set$ids() }#>#> <LearnerClassifRanger:classif.ranger> #> * Model: - #> * Parameters: list() #> * Packages: ranger #> * Predict Type: response #> * Feature types: logical, integer, numeric, character, factor, ordered #> * Properties: importance, multiclass, oob_error, twoclass, weights#> [1] "num.trees" "mtry" #> [3] "importance" "write.forest" #> [5] "min.node.size" "replace" #> [7] "sample.fraction" "class.weights" #> [9] "splitrule" "num.random.splits" #> [11] "split.select.weights" "always.split.variables" #> [13] "respect.unordered.factors" "scale.permutation.importance" #> [15] "keep.inbag" "holdout" #> [17] "num.threads" "save.memory" #> [19] "verbose" "oob.error" #> [21] "max.depth" "alpha" #> [23] "min.prop" "regularization.factor" #> [25] "regularization.usedepth" "seed" #> [27] "minprop" "predict.all" #> [29] "se.method"