mlr_learners_regr.featureless: Featureless Regression Learner

mlr_learners_regr.featurelessR Documentation

Featureless Regression Learner

Description

A simple LearnerRegr which only analyzes the response during train, ignoring all features. If hyperparameter robust is FALSE (default), constantly predicts mean(y) as response and sd(y) as standard error. If robust is TRUE, median() and mad() are used instead of mean() and sd(), respectively.

For weighted data, the response is the weighted mean (weighted median for robust regression). The predicted standard error is the square root of the weighted variance estimator with bias correction based on effective degrees of freedom:

sd(y, weights) = sqrt(
  sum(weights * (y - weighted.mean(y, weights))^2) /
    (sum(weights) - sum(weights ^2) / sum(weights))
)

If robust is TRUE, the weighted median absolute deviation is used, adjusted by a factor of 1.4826 for consistency with mad().

Dictionary

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

mlr_learners$get("regr.featureless")
lrn("regr.featureless")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”, “se”, “quantiles”

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

  • Required Packages: mlr3, 'stats'

Parameters

Id Type Default Levels
robust logical TRUE TRUE, FALSE

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrFeatureless

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerRegrFeatureless$new()

Method importance()

All features have a score of 0 for this learner.

Usage
LearnerRegrFeatureless$importance()
Returns

Named numeric().


Method selected_features()

Selected features are always the empty set for this learner.

Usage
LearnerRegrFeatureless$selected_features()
Returns

character(0).


Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerRegrFeatureless$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

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


mlr-org/mlr3 documentation built on July 4, 2025, 3:40 a.m.