Skip to contents

Adaptive best-subset selection for classification. Calls abess::abess() from abess.

Dictionary

This Learner can be instantiated via lrn():

lrn("classif.abess")

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

  • Feature Types: “integer”, “numeric”

  • Required Packages: mlr3, abess

Parameters

IdTypeDefaultLevelsRange
familycharacter-binomial, multinomial, ordinal-
tune.pathcharactersequencesequence, gsection-
tune.typecharactergicgic, aic, bic, ebic, cv-
normalizeintegerNULL\((-\infty, \infty)\)
support.sizeuntypedNULL-
c.maxinteger2\([1, \infty)\)
gs.rangeuntypedNULL-
lambdanumeric0\([0, \infty)\)
always.includeuntypedNULL-
group.indexuntypedNULL-
init.active.setuntypedNULL-
splicing.typeinteger2\([1, 2]\)
max.splicing.iterinteger20\([1, \infty)\)
screening.numintegerNULL\([0, \infty)\)
important.searchintegerNULL\([0, \infty)\)
warm.startlogicalTRUETRUE, FALSE-
nfoldsinteger5\((-\infty, \infty)\)
foldiduntypedNULL-
cov.updatelogicalFALSETRUE, FALSE-
newtoncharacterexactexact, approx-
newton.threshnumeric1e-06\([0, \infty)\)
max.newton.iterintegerNULL\([1, \infty)\)
early.stoplogicalFALSETRUE, FALSE-
ic.scalenumeric1\([0, \infty)\)
num.threadsinteger0\([0, \infty)\)
seedinteger0\((-\infty, \infty)\)

Initial parameter values

  • num.threads: This parameter is initialized to 1 (default is 0) to avoid conflicts with the mlr3 parallelization.

  • family: Depends on the task type, if the parameter family is NULL, it is set to "binomial" for binary classification tasks and to "multinomial" for multiclass classification problems.

See also

Author

abess-team

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifAbess

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method selected_features()

Extract the name of selected features from the model by abess::extract().

Usage

LearnerClassifAbess$selected_features()

Returns

The names of selected features


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifAbess$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = mlr3::lrn("classif.abess")
print(learner)
#> 
#> ── <LearnerClassifAbess> (classif.abess): Fast Best Subset Selection for Classif
#> • Model: -
#> • Parameters: num.threads=1
#> • Packages: mlr3 and abess
#> • Predict Types: [response] and prob
#> • Feature Types: integer and numeric
#> • Encapsulation: none (fallback: -)
#> • Properties: multiclass, selected_features, twoclass, and weights
#> • Other settings: use_weights = 'use'

# Define a Task
task = mlr3::tsk("sonar")

# Create train and test set
ids = mlr3::partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)
#> Call:
#> abess.default(x = x, y = y, family = "binomial", num.threads = 1L)
#> 
#>    support.size      dev      GIC
#> 1             0 96.34386 192.6877
#> 2             1 77.54259 161.6208
#> 3             2 73.80409 160.6793
#> 4             3 66.39610 152.3989
#> 5             4 62.97998 152.1023
#> 6             5 60.30137 153.2806
#> 7             6 57.27219 153.7579
#> 8             7 54.24646 154.2420
#> 9             8 52.23219 156.7490
#> 10            9 49.32739 157.4750
#> 11           10 46.16553 157.6869
#> 12           11 42.78770 157.4668
#> 13           12 40.01961 158.4662
#> 14           13 36.75307 158.4687
#> 15           14 34.53900 160.5761
#> 16           15 32.77788 163.5895
#> 17           16 29.64610 163.8615
#> 18           17 27.30728 165.7194
#> 19           18 26.04582 169.7321
#> 20           19 25.22697 174.6300
#> 21           20 24.15616 179.0240
#> 22           21 23.50762 184.2625


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()
#> classif.ce 
#>  0.2463768