Classification Learner for Debugging
A simple LearnerClassif used primarily in the unit tests and for debugging purposes. If no hyperparameter is set, it simply constantly predicts a randomly selected label. The following hyperparameters trigger the following actions:
Probability to output a message during train.
Probability to output a message during predict.
Probability to signal a warning during train.
Probability to signal a warning during predict.
Probability to raises an exception during train.
Probability to raise an exception during predict.
Probability to provokes a segfault during train.
Probability to provokes a segfault during predict.
Ratio of predictions which will be NA.
Saves input task in model
slot during training and prediction.
Number of threads to use. Has no effect.
Numeric tuning parameter. Has no effect.
Note that segfaults may not be triggered on your operating system. Also note that if they work, they will tear down your R session immediately!
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
mlr_learners$get("classif.featureless") lrn("classif.featureless")
Task type: “classif”
Predict Types: “response”, “prob”
Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered”
Required Packages: -
Id | Type | Default | Range | Levels |
message_train | numeric | 0 | [0, 1] | - |
message_predict | numeric | 0 | [0, 1] | - |
warning_train | numeric | 0 | [0, 1] | - |
warning_predict | numeric | 0 | [0, 1] | - |
error_train | numeric | 0 | [0, 1] | - |
error_predict | numeric | 0 | [0, 1] | - |
segfault_train | numeric | 0 | [0, 1] | - |
segfault_predict | numeric | 0 | [0, 1] | - |
predict_missing | numeric | 0 | [0, 1] | - |
save_tasks | logical | FALSE | (-Inf, Inf) | TRUE, FALSE |
threads | integer | - | [1, Inf) | - |
x | numeric | - | [0, 1] | - |
mlr3::Learner
-> mlr3::LearnerClassif
-> LearnerClassifDebug
new()
Creates a new instance of this R6 class.
LearnerClassifDebug$new()
clone()
The objects of this class are cloneable with this method.
LearnerClassifDebug$clone(deep = FALSE)
deep
Whether to make a deep clone.
as.data.table(mlr_learners)
for a complete table of all (also dynamically created) Learner implementations.
learner = lrn("classif.debug") learner$param_set$values = list(message_train = 1, save_tasks = TRUE) # this should signal a message task = tsk("penguins") learner$train(task) learner$predict(task) # task_train and task_predict are the input tasks for train() and predict() names(learner$model)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.