cl_svm: A support vector machine classifier (CL)

Description Usage Arguments Details See Also Examples

View source: R/cl_svm.R

Description

This classifier uses the e1071 package to implement a support vector machine.

Usage

1

Arguments

...

All parameters that are available in the e1071 package svm() object should work with this CL object.

Details

A support vector machine (SVM) is a classifier that learns a function f that minimizes the hinge loss between predictions made on the training data, while also applying a penalty for more complex f (the penalty is based on the norm of f in a reproducing kernel Hilbert space). The SVM has a parameter C that controls the trade off between the empirical loss (i.e., a smaller prediction error on the training set), and the complexity of the f. SVMs can use different kernels to create nonlinear decision boundaries.

SVMs are work on binary classification problems, so to do multi-class classification, an all-pairs classification scheme (which is the default for the e1071 package). In the all-pairs scheme,training separate classifiers for all pairs of labels (i.e., if there are 100 different classes then nchoosek(100, 2) = 4950 different classifiers are trained). Testing the classifier in all-pairs involves having all classifiers classify the test point, and then the class label is given to the class the was chosen most often by the binary classifiers (in the case of a tie in the number of classes that won a contest the class label is randomly chosen). The decision values for all-pairs are the number of contests won by each class (for each test point).

See Also

e1071

Other classifier: cl_max_correlation(), cl_poisson_naive_bayes()

Examples

1
2
3
4
5
# using the default e1071 parameters
cl <- cl_svm()

# using a linear kernel
cl <- cl_svm(kernel = "linear")

emeyers/NDTr documentation built on Aug. 8, 2020, 3:41 p.m.