mlr_learners_regr.liblinear: L2-Regularized Support Vector Regression Learner

mlr_learners_regr.liblinearR Documentation

L2-Regularized Support Vector Regression Learner

Description

L2 regularized support vector regression. Calls LiblineaR::LiblineaR() from LiblineaR.

Details

Type of SVR depends on type argument:

  • type = 11 - L2-regularized L2-loss support vector regression (primal)

  • type = 12 – L2-regularized L2-loss support vector regression (dual)

  • type = 13 – L2-regularized L1-loss support vector regression (dual)

Dictionary

This Learner can be instantiated via lrn():

lrn("regr.liblinear")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “integer”, “numeric”

  • Required Packages: mlr3, mlr3extralearners, LiblineaR

Parameters

Id Type Default Levels Range
type integer 11 [11, 13]
cost numeric 1 [0, \infty)
bias numeric 1 (-\infty, \infty)
svr_eps numeric NULL [0, \infty)
cross integer 0 [0, \infty)
verbose logical FALSE TRUE, FALSE -
findC logical FALSE TRUE, FALSE -
useInitC logical TRUE TRUE, FALSE -

Initial parameter values

  • svr_eps:

    • Actual default: NULL

    • Initial value: 0.001

    • Reason for change: svr_eps is type dependent and the "type" is handled by the mlr3learner. The default value is set to th default of the respective "type".

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLiblineaR

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerRegrLiblineaR$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerRegrLiblineaR$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

be-marc

References

Fan, Rong-En, Chang, Kai-Wei, Hsieh, Cho-Jui, Wang, Xiang-Rui, Lin, Chih-Jen (2008). “LIBLINEAR: A library for large linear classification.” the Journal of machine Learning research, 9, 1871–1874.

See Also

Examples


# Define the Learner
learner = mlr3::lrn("regr.liblinear")
print(learner)

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

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