mlr_learners_classif.abess: Classification Abess Learner

mlr_learners_classif.abessR Documentation

Classification Abess Learner

Description

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

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 parameter family is NULL, it is set to "binomial" for binary classification tasks and to "multinomial" for multiclass classification problems.

Super classes

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

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerClassifAbess$new()

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.

Author(s)

abess-team

See Also

Examples


# Define the Learner
learner = mlr3::lrn("classif.abess")
print(learner)

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


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

# Score the predictions
predictions$score()


mlr-org/mlr3extralearners documentation built on Dec. 21, 2024, 2:21 p.m.