Skip to contents

Calls LiblineaR::LiblineaR from package LiblineaR.

Details

Type of SVC depends on type argument:

  • 0 – L2-regularized logistic regression (primal)

  • 1 - L2-regularized L2-loss support vector classification (dual)

  • 3 - L2-regularized L1-loss support vector classification (dual)

  • 2 – L2-regularized L2-loss support vector classification (primal)

  • 4 – Support vector classification by Crammer and Singer

  • 5 - L1-regularized L2-loss support vector classification

  • 6 - L1-regularized logistic regression

  • 7 - L2-regularized logistic regression (dual)

If number of records > number of features, type = 2 is faster than type = 1 (Hsu et al. 2003).

Note that probabilistic predictions are only available for types 0, 6, and 7.

The default epsilon value depends on the type parameter, see LiblineaR::LiblineaR.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("classif.liblinear")
lrn("classif.liblinear")

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

  • Feature Types: “numeric”

  • Required Packages: mlr3extralearners, LiblineaR

Parameters

IdTypeDefaultLevelsRange
typeinteger0\([0, 7]\)
costnumeric1\([0, \infty)\)
epsilonnumeric-\([0, \infty)\)
biasnumeric1\((-\infty, \infty)\)
crossinteger0\([0, \infty)\)
verboselogicalFALSETRUE, FALSE\((-\infty, \infty)\)
wilistNULL\((-\infty, \infty)\)
findClogicalFALSETRUE, FALSE\((-\infty, \infty)\)
useInitClogicalTRUETRUE, FALSE\((-\infty, \infty)\)

See also

Author

be-marc

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLiblineaR

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifLiblineaR$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("LiblineaR", quietly = TRUE)) {
  learner = mlr3::lrn("classif.liblinear")
  print(learner)

  # available parameters:
  learner$param_set$ids()
}
#> <LearnerClassifLiblineaR:classif.liblinear>
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3extralearners, LiblineaR
#> * Predict Type: response
#> * Feature types: numeric
#> * Properties: multiclass, twoclass
#> [1] "type"     "cost"     "epsilon"  "bias"     "cross"    "verbose"  "wi"      
#> [8] "findC"    "useInitC"