mlr_learners_regr.debug | R Documentation |
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:
Ratio of predictions which will be NA.
To to encode missingness. “na” will insert NA values, “omit” will just return fewer predictions than requested.
Saves input task in model
slot during training and prediction.
Number of threads to use. Has no effect.
Numeric tuning parameter. Has no effect.
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
mlr_learners$get("regr.debug") lrn("regr.debug")
Task type: “regr”
Predict Types: “response”, “se”, “quantiles”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”
Required Packages: mlr3
Id | Type | Default | Levels | Range |
predict_missing | numeric | 0 | [0, 1] |
|
predict_missing_type | character | na | na, omit | - |
save_tasks | logical | FALSE | TRUE, FALSE | - |
threads | integer | - | [1, \infty) |
|
x | numeric | - | [0, 1] |
|
mlr3::Learner
-> mlr3::LearnerRegr
-> LearnerRegrDebug
new()
Creates a new instance of this R6 class.
LearnerRegrDebug$new()
importance()
Returns 0 for each feature seen in training.
LearnerRegrDebug$importance()
Named numeric()
.
selected_features()
Always returns character(0).
LearnerRegrDebug$selected_features()
character()
.
clone()
The objects of this class are cloneable with this method.
LearnerRegrDebug$clone(deep = FALSE)
deep
Whether to make a deep clone.
Chapter in the mlr3book: https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html#sec-learners
Package mlr3learners for a solid collection of essential learners.
Package mlr3extralearners for more learners.
Dictionary of Learners: mlr_learners
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).
mlr3pipelines to combine learners with pre- and postprocessing steps.
Package mlr3viz for some generic visualizations.
Extension packages for additional task types:
mlr3proba for probabilistic supervised regression and survival analysis.
mlr3cluster for unsupervised clustering.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Other Learner:
Learner
,
LearnerClassif
,
LearnerRegr
,
mlr_learners
,
mlr_learners_classif.debug
,
mlr_learners_classif.featureless
,
mlr_learners_classif.rpart
,
mlr_learners_regr.featureless
,
mlr_learners_regr.rpart
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.