Skip to contents

A LearnerRegr for a regression tree implemented in rpart::rpart() in package rpart.

Initial parameter values

  • Parameter xval is initialized to 0 in order to save some computation time.

Custom mlr3 parameters

  • Parameter model has been renamed to keep_model.

Dictionary

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

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

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”

  • Required Packages: mlr3, rpart

Parameters

IdTypeDefaultLevelsRange
cpnumeric0.01\([0, 1]\)
keep_modellogicalFALSETRUE, FALSE-
maxcompeteinteger4\([0, \infty)\)
maxdepthinteger30\([1, 30]\)
maxsurrogateinteger5\([0, \infty)\)
minbucketinteger-\([1, \infty)\)
minsplitinteger20\([1, \infty)\)
surrogatestyleinteger0\([0, 1]\)
usesurrogateinteger2\([0, 2]\)
xvalinteger10\([0, \infty)\)

References

Breiman L, Friedman JH, Olshen RA, Stone CJ (1984). Classification And Regression Trees. Routledge. doi:10.1201/9781315139470 .

See also

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

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRpart

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method importance()

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

Usage

LearnerRegrRpart$importance()

Returns

Named numeric().


Method selected_features()

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

Usage

LearnerRegrRpart$selected_features()

Returns

character().


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrRpart$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.