mlr_learners_regr.rpf: Regression Random Planted Forest Learner

mlr_learners_regr.rpfR Documentation

Regression Random Planted Forest Learner

Description

Random Planted Forest: A directly interpretable tree ensemble.

Calls randomPlantedForest::rpf() from 'randomPlantedForest'.

Dictionary

This Learner can be instantiated via lrn():

lrn("regr.rpf")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

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

  • Required Packages: mlr3, randomPlantedForest

Parameters

Id Type Default Levels Range
max_interaction integer 1 [0, \infty)
max_interaction_ratio numeric - [0, 1]
max_interaction_limit integer - [1, \infty)
ntrees integer 50 [1, \infty)
splits integer 30 [1, \infty)
split_try integer 10 [1, \infty)
t_try numeric 0.4 [0, 1]
deterministic logical FALSE TRUE, FALSE -
nthreads integer 1 [1, \infty)
cv logical FALSE TRUE, FALSE -
purify logical FALSE TRUE, FALSE -

Custom mlr3 parameters

  • max_interaction:

    • This hyperparameter can alternatively be set via max_interaction_ratio as max_interaction = max(ceiling(max_interaction_ratio * n_features), 1). The parameter max_interaction_limit can optionally be set as an upper bound, such that max_interaction_ratio * min(n_features, max_interaction_limit) is used instead. This is analogous to mtry.ratio in classif.ranger, with max_interaction_limit as an additional constraint. The parameter max_interaction_limit is initialized to Inf.

Installation

Package 'randomPlantedForest' is not on CRAN and has to be installed from GitHub via remotes::install_github("PlantedML/randomPlantedForest").

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRandomPlantedForest

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerRegrRandomPlantedForest$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerRegrRandomPlantedForest$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

jemus42

References

Hiabu, Munir, Mammen, Enno, Meyer, T. J (2023). “Random Planted Forest: a directly interpretable tree ensemble.” arXiv preprint arXiv:2012.14563. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/ARXIV.2012.14563")}.

See Also

Examples


# Define the Learner
learner = mlr3::lrn("regr.rpf")
print(learner)

# Define a Task
task = mlr3::tsk("mtcars")

# Create train and test set
ids = mlr3::partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()


mlr-org/mlr3extralearners documentation built on Nov. 11, 2024, 11:11 a.m.