Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Support Vector Machine

Source:R/LearnerRegrSVM.R
mlr_learners_regr.svm.Rd

Support vector machine for regression.Callse1071::svm() from packagee1071.

Dictionary

Thismlr3::Learner can be instantiated via thedictionarymlr3::mlr_learners or with the associated sugar functionmlr3::lrn():

mlr_learners$get("regr.svm")lrn("regr.svm")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “logical”, “integer”, “numeric”

  • Required Packages:mlr3,mlr3learners,e1071

Parameters

IdTypeDefaultLevelsRange
cachesizenumeric40\((-\infty, \infty)\)
coef0numeric0\((-\infty, \infty)\)
costnumeric1\([0, \infty)\)
crossinteger0\([0, \infty)\)
degreeinteger3\([1, \infty)\)
epsilonnumeric0.1\([0, \infty)\)
fittedlogicalTRUETRUE, FALSE-
gammanumeric-\([0, \infty)\)
kernelcharacterradiallinear, polynomial, radial, sigmoid-
nunumeric0.5\((-\infty, \infty)\)
scaleuntypedTRUE-
shrinkinglogicalTRUETRUE, FALSE-
tolerancenumeric0.001\([0, \infty)\)
typecharactereps-regressioneps-regression, nu-regression-

References

Cortes, Corinna, Vapnik, Vladimir (1995).“Support-vector networks.”Machine Learning,20(3), 273–297.doi:10.1007/BF00994018.

See also

Other Learner:mlr_learners_classif.cv_glmnet,mlr_learners_classif.glmnet,mlr_learners_classif.kknn,mlr_learners_classif.lda,mlr_learners_classif.log_reg,mlr_learners_classif.multinom,mlr_learners_classif.naive_bayes,mlr_learners_classif.nnet,mlr_learners_classif.qda,mlr_learners_classif.ranger,mlr_learners_classif.svm,mlr_learners_classif.xgboost,mlr_learners_regr.cv_glmnet,mlr_learners_regr.glmnet,mlr_learners_regr.kknn,mlr_learners_regr.km,mlr_learners_regr.lm,mlr_learners_regr.nnet,mlr_learners_regr.ranger,mlr_learners_regr.xgboost

Super classes

mlr3::Learner ->mlr3::LearnerRegr ->LearnerRegrSVM

Methods

Public methods

Inherited methods


Methodnew()

Creates a new instance of thisR6 class.

Usage


Methodclone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrSVM$clone(deep=FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if(requireNamespace("e1071", quietly=TRUE)){# Define the Learner and set parameter valueslearner=lrn("regr.svm")print(learner)# Define a Tasktask=tsk("mtcars")# Create train and test setids=partition(task)# Train the learner on the training idslearner$train(task, row_ids=ids$train)# print the modelprint(learner$model)# importance methodif("importance"%in%learner$properties)print(learner$importance)# Make predictions for the test rowspredictions=learner$predict(task, row_ids=ids$test)# Score the predictionspredictions$score()}#> <LearnerRegrSVM:regr.svm>: Support Vector Machine#> * Model: -#> * Parameters: list()#> * Packages: mlr3, mlr3learners, e1071#> * Predict Types:  [response]#> * Feature Types: logical, integer, numeric#> * Properties: -#>#> Call:#> svm.default(x = data, y = task$truth())#>#>#> Parameters:#>    SVM-Type:  eps-regression#>  SVM-Kernel:  radial#>        cost:  1#>       gamma:  0.1#>     epsilon:  0.1#>#>#> Number of Support Vectors:  18#>#> regr.mse#> 14.62665

[8]ページ先頭

©2009-2025 Movatter.jp