mlr_learners_classif.randomForest.Rd
Calls randomForest::randomForest from package randomForest.
This Learner can be instantiated via the
dictionary mlr_learners or with the associated
sugar function lrn()
:
mlr_learners$get("classif.randomForest") lrn("classif.randomForest")
Packages: randomForest
Predict Types: response, prob
Feature Types: numeric, factor, ordered
Properties: importance, multiclass, oob_error, twoclass, weights
Breiman, L. (2001). Random Forests Machine Learning https://doi.org/10.1023/A:1010933404324
pat-s
mlr3::Learner
-> mlr3::LearnerClassif
-> LearnerClassifRandomForest
new()
Creates a new instance of this R6 class.
LearnerClassifRandomForest$new()
importance()
The importance scores are extracted from the slot importance
.
Parameter 'importance' must be set to either "accuracy"
or "gini"
.
LearnerClassifRandomForest$importance()
Named numeric()
.
oob_error()
OOB errors are extracted from the model slot err.rate
.
LearnerClassifRandomForest$oob_error()
clone()
The objects of this class are cloneable with this method.
LearnerClassifRandomForest$clone(deep = FALSE)
deep
Whether to make a deep clone.
# stop example failing with warning if package not installed learner = suppressWarnings(mlr3::lrn("classif.randomForest")) print(learner)#> <LearnerClassifRandomForest:classif.randomForest> #> * Model: - #> * Parameters: list() #> * Packages: randomForest #> * Predict Type: response #> * Feature types: numeric, factor, ordered #> * Properties: importance, multiclass, oob_error, twoclass, weights# available parameters: learner$param_set$ids()#> [1] "ntree" "mtry" "replace" "classwt" "cutoff" #> [6] "strata" "sampsize" "nodesize" "maxnodes" "importance" #> [11] "localImp" "proximity" "oob.prox" "norm.votes" "do.trace" #> [16] "keep.forest" "keep.inbag" "predict.all" "nodes"