mlr_learners_regr.liblinear | R Documentation |
L2 regularized support vector regression.
Calls LiblineaR::LiblineaR()
from LiblineaR.
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)
This Learner can be instantiated via lrn():
lrn("regr.liblinear")
Task type: “regr”
Predict Types: “response”
Feature Types: “integer”, “numeric”
Required Packages: mlr3, mlr3extralearners, LiblineaR
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 | - |
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".
mlr3::Learner
-> mlr3::LearnerRegr
-> LearnerRegrLiblineaR
new()
Creates a new instance of this R6 class.
LearnerRegrLiblineaR$new()
clone()
The objects of this class are cloneable with this method.
LearnerRegrLiblineaR$clone(deep = FALSE)
deep
Whether to make a deep clone.
be-marc
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.
Dictionary of Learners: mlr3::mlr_learners.
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.
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.