mlr3 (version 0.3.0)

mlr_learners_classif.rpart: Classification Tree Learner

Description

A LearnerClassif for a classification tree implemented in rpart::rpart() in package rpart. Parameter xval is set to 0 in order to save some computation time.

Arguments

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("classif.rpart")
lrn("classif.rpart")

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRpart

Methods

Public methods

Method new()

Creates a new instance of this R6 class.

Usage

LearnerClassifRpart$new()

Method importance()

The importance scores are extracted from the model slot variable.importance.

Usage

LearnerClassifRpart$importance()

Returns

Named numeric().

Method selected_features()

Selected features are extracted from the model slot frame$var.

Usage

LearnerClassifRpart$selected_features()

Returns

character().

Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifRpart$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

References

mlr3breiman_1984

See Also

Dictionary of Learners: mlr_learners

as.data.table(mlr_learners) for a complete table of all (also dynamically created) Learner implementations.

Other Learner: LearnerClassif, LearnerRegr, Learner, mlr_learners_classif.debug, mlr_learners_classif.featureless, mlr_learners_regr.featureless, mlr_learners_regr.rpart, mlr_learners