Skip to contents

Logistic Regression, where the features used in the model are selected by running Exhaustive Search.

Calls ExhaustiveSearch::ExhaustiveSearch() from ExhaustiveSearch.

Initial parameter values

  • family:

    • Actual default: NULL

    • Adjusted default: "binomial"

    • Reason for change: To comply with mlr3 architecture, we differentiate between classification and regression learners.

  • nThreads:

    • Actual default: NULL

    • Adjusted default: 1

    • Reason for change: Suppressing the automatic internal parallelization if cv.folds > 0.

  • quietly:

    • Actual default: FALSE

    • Adjusted default: TRUE

    • Reason for change: Suppression of constant printing to console

Dictionary

This Learner can be instantiated via lrn():

lrn("classif.exhaustive_search")

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

  • Feature Types: “logical”, “integer”, “numeric”

  • Required Packages: mlr3, mlr3extralearners, ExhaustiveSearch

Parameters

IdTypeDefaultLevelsRange
familycharacter-gaussian, binomial-
performanceMeasurecharacter-MSE, AIC-
combsUpTointeger-\([1, \infty)\)
nResultsinteger5000\([1, \infty)\)
nThreadsinteger-\([1, \infty)\)
testSetIDsinteger-\([1, \infty)\)
errorValuntyped-1L-
quietlylogical-TRUE, FALSE-
checkLargelogicalTRUETRUE, FALSE-

See also

Author

ngerman

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifExhaustiveSearch

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method selected_features()

Extracts selected features of this learner.

Usage

LearnerClassifExhaustiveSearch$selected_features()


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifExhaustiveSearch$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# define the learner
learner = lrn("classif.exhaustive_search", predict_type = "prob", combsUpTo = 3)

# define the task
# and subset to 3 features to speed up the example
tsk_sonar = tsk("sonar")$select(c("V1", "V2", "V3"))

# train the learner
learner$train(tsk_sonar)

# extract selected features
learner$selected_features()
#> [1] "V1"

# predict on training task
learner$predict(tsk_sonar)
#> 
#> ── <PredictionClassif> for 208 observations: ───────────────────────────────────
#>  row_ids truth response    prob.M    prob.R
#>        1     R        R 0.4753214 0.5246786
#>        2     R        M 0.6664160 0.3335840
#>        3     R        M 0.5237325 0.4762675
#>      ---   ---      ---       ---       ---
#>      206     M        M 0.7125284 0.2874716
#>      207     M        M 0.5555589 0.4444411
#>      208     M        M 0.5221729 0.4778271