Classification Abess Learner
mlr_learners_classif.abess.Rd
Adaptive best-subset selection for classification.
Calls abess::abess()
from abess.
Parameters
Id | Type | Default | Levels | Range |
family | character | - | binomial, multinomial, ordinal | - |
tune.path | character | sequence | sequence, gsection | - |
tune.type | character | gic | gic, aic, bic, ebic, cv | - |
normalize | integer | NULL | \((-\infty, \infty)\) | |
support.size | untyped | NULL | - | |
c.max | integer | 2 | \([1, \infty)\) | |
gs.range | untyped | NULL | - | |
lambda | numeric | 0 | \([0, \infty)\) | |
always.include | untyped | NULL | - | |
group.index | untyped | NULL | - | |
init.active.set | untyped | NULL | - | |
splicing.type | integer | 2 | \([1, 2]\) | |
max.splicing.iter | integer | 20 | \([1, \infty)\) | |
screening.num | integer | NULL | \([0, \infty)\) | |
important.search | integer | NULL | \([0, \infty)\) | |
warm.start | logical | TRUE | TRUE, FALSE | - |
nfolds | integer | 5 | \((-\infty, \infty)\) | |
foldid | untyped | NULL | - | |
cov.update | logical | FALSE | TRUE, FALSE | - |
newton | character | exact | exact, approx | - |
newton.thresh | numeric | 1e-06 | \([0, \infty)\) | |
max.newton.iter | integer | NULL | \([1, \infty)\) | |
early.stop | logical | FALSE | TRUE, FALSE | - |
ic.scale | numeric | 1 | \([0, \infty)\) | |
num.threads | integer | 0 | \([0, \infty)\) | |
seed | integer | 0 | \((-\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 parameterfamily
isNULL
, it is set to"binomial"
for binary classification tasks and to"multinomial"
for multiclass classification problems.
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3::LearnerClassif
-> LearnerClassifAbess
Methods
Method selected_features()
Extract the name of selected features from the model by abess::extract()
.
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