Learn R Programming

mlr3 (version 0.13.1)

mlr_learners_classif.featureless: Featureless Classification Learner

Description

A simple LearnerClassif which only analyzes the labels during train, ignoring all features. Hyperparameter method determines the mode of operation during prediction:

mode:

Predicts the most frequent label. If there are two or more labels tied, randomly selects one per prediction.

sample:

Randomly predict a label uniformly.

weighted.sample:

Randomly predict a label, with probability estimated from the training distribution.

Arguments

Dictionary

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")

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

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

  • Required Packages: mlr3

Parameters

Id Type Default Range Levels
method character mode - mode, sample, weighted.sample

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifFeatureless

Methods

Public methods

Method new()

Creates a new instance of this R6 class.

Usage

LearnerClassifFeatureless$new()

Method importance()

All features have a score of 0 for this learner.

Usage

LearnerClassifFeatureless$importance()

Returns

Named numeric().

Method selected_features()

Selected features are always the empty set for this learner.

Usage

LearnerClassifFeatureless$selected_features()

Returns

character(0).

Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifFeatureless$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

  • Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#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: LearnerClassif, LearnerRegr, Learner, mlr_learners_classif.debug, mlr_learners_classif.rpart, mlr_learners_regr.debug, mlr_learners_regr.featureless, mlr_learners_regr.rpart, mlr_learners