mlr_learners_regr.debug: Regression Learner for Debugging

Description Dictionary Meta Information Parameters Super classes Methods See Also Examples

Description

A simple LearnerRegr used primarily in the unit tests and for debugging purposes. If no hyperparameter is set, it simply constantly predicts the mean value of the training data. The following hyperparameters trigger the following actions:

predict_missing:

Ratio of predictions which will be NA.

predict_missing_type:

To to encode missingness. “na” will insert NA values, “omit” will just return fewer predictions than requested.

save_tasks:

Saves input task in model slot during training and prediction.

threads:

Number of threads to use. Has no effect.

x:

Numeric tuning parameter. Has no effect.

Dictionary

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

1
2
mlr_learners$get("regr.debug")
lrn("regr.debug")

Meta Information

Parameters

Id Type Default Range Levels
predict_missing numeric 0 [0, 1] -
predict_missing_type character na - na, omit
save_tasks logical FALSE - TRUE, FALSE
threads integer - [1, Inf) -
x numeric - [0, 1] -

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrDebug

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerRegrDebug$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerRegrDebug$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

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

Examples

1
2
3
4
5
6
7
task = tsk("mtcars")
learner = lrn("regr.debug", save_tasks = TRUE)
learner$train(task, row_ids = 1:20)
prediction = learner$predict(task, row_ids = 21:32)

learner$model$task_train
learner$model$task_predict

mlr3 documentation built on Jan. 19, 2022, 5:08 p.m.