Skip to contents

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

Dictionary

This Learner can be instantiated via lrn():

lrn("regr.abess")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “integer”, “numeric”

  • Required Packages: mlr3, abess

Parameters

IdTypeDefaultLevelsRange
familycharactergaussiangaussian, mgaussian, poisson, gamma-
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)\)
seedinteger1\((-\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

bbayukari

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrAbess

Methods

Inherited methods


LearnerRegrAbess$new()

Creates a new instance of this R6 class.

Usage


LearnerRegrAbess$selected_features()

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

Usage

LearnerRegrAbess$selected_features()

Returns

The names of selected features


LearnerRegrAbess$clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrAbess$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

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

# Define a Task
task = tsk("mtcars")

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

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

print(learner$model)
#> Call:
#> abess.default(x = task$data(cols = task$feature_names), y = as.matrix(task$data(cols = task$target_names)), 
#>     num.threads = 1L)
#> 
#>   support.size        dev      GIC
#> 1            0 20.1915646 63.11056
#> 2            1  3.9086257 31.19047
#> 3            2  2.6929264 25.93034
#> 4            3  1.8928687 21.09067
#> 5            4  1.7975002 22.56861
#> 6            5  1.4965541 21.28432
#> 7            6  1.3837269 22.20181
#> 8            7  1.1715203 21.26933
#> 9            8  0.9767067 20.01361


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

# Score the predictions
predictions$score()
#> regr.mse 
#> 33.09172