Skip to contents

model_categorical_svm

Usage

model_categorical_svm(x, y, kernel = "linear", ...)

Arguments

x

features/predictors used in prediction of outcome

y

categorical outcome to predict

kernel

SVM kernel passed to e1071::svm()

Value

Fitted SVM model from e1071::svm().

Examples

x <- iris[, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")]
y <- iris$Species
model_categorical_svm(x, y)
#> 
#> Call:
#> svm.default(x = x, y = y, kernel = kernel)
#> 
#> 
#> Parameters:
#>    SVM-Type:  C-classification 
#>  SVM-Kernel:  linear 
#>        cost:  1 
#> 
#> Number of Support Vectors:  29
#>