A simple LearnerClassif which only analyses the labels during train, ignoring all features.
Hyperparameter method determines the mode of operation during prediction:
Predicts the most frequent label. If there are two or more labels tied, randomly selects one per prediction.
Randomly predict a label uniformly.
Randomly predict a label, with probability estimated from the training distribution.
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”, “POSIXct”
Required Packages: -
| Id | Type | Default | Range | Levels |
| method | character | mode | \((-\infty, \infty)\) | mode, sample, weighted.sample |
mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifFeatureless
new()Creates a new instance of this R6 class.
LearnerClassifFeatureless$new()
importance()All features have a score of 0 for this learner.
LearnerClassifFeatureless$importance()
Named numeric().
selected_features()Selected features are always the empty set for this learner.
LearnerClassifFeatureless$selected_features()
character(0).
clone()The objects of this class are cloneable with this method.
LearnerClassifFeatureless$clone(deep = FALSE)
deepWhether to make a deep clone.
Dictionary of Learners: mlr_learners
as.data.table(mlr_learners) for a complete table of all (also dynamically created) Learner implementations.
Other Learner:
LearnerClassif,
LearnerRegr,
Learner,
mlr_learners_classif.debug,
mlr_learners_classif.rpart,
mlr_learners_regr.featureless,
mlr_learners_regr.rpart,
mlr_learners