| svmlight | R Documentation | 
Function to call SVMlight from R for classification. Multiple group classification is done with the one-against-rest partition of data.
svmlight(x, ...)
## Default S3 method:
svmlight(x, grouping, temp.dir = NULL, pathsvm = NULL, 
    del = TRUE, type = "C", class.type = "oaa", svm.options = NULL, 
    prior = NULL, out = FALSE, ...)
## S3 method for class 'data.frame'
svmlight(x, ...)
## S3 method for class 'matrix'
svmlight(x, grouping, ..., subset, na.action = na.fail)
## S3 method for class 'formula'
svmlight(formula, data = NULL, ..., subset, 
    na.action = na.fail)
| x | matrix or data frame containing the explanatory variables 
(required, if  | 
| grouping | factor specifying the class for each observation 
(required, if  | 
| formula | formula of the form  | 
| data | Data frame from which variables specified in  | 
| temp.dir | directory for temporary files. | 
| pathsvm | Path to SVMlight binaries (required, if path is unknown by the OS). | 
| del | Logical: whether to delete temporary files | 
| type | Perform  | 
| class.type | Multiclass scheme to use. See details. | 
| svm.options | Optional parameters to SVMlight. For further details see: “How to use” on http://svmlight.joachims.org/. | 
| prior | A Priori probabilities of classes. | 
| out | Logical: whether SVMlight output ahouild be printed on console (only for Windows OS.) | 
| subset | An index vector specifying the cases to be used in the training sample. (Note: If given, this argument must be named.) | 
| na.action | specify the action to be taken if  | 
| ... | currently unused | 
Function to call SVMlight from R for classification (type="C"). 
SVMlight is an implementation of Vapnik's Support Vector Machine. It
is written in C by Thorsten Joachims. On the homepage (see below) the
source-code and several binaries for SVMlight are available. If more
then two classes are given the SVM is learned by the one-against-all
scheme (class.type="oaa"). That means that each class is trained against the other K-1
classes. The class with the highest decision function in the SVM
wins. So K SVMs have to be learned.
If class.type="oao" each class is tested against every other and the final class is elected
by a majority vote.
If type="R" a SVM Regression is performed.
A list containing the function call and the result of SVMlight.
SVMlight (http://svmlight.joachims.org/) must be installed before using this interface.
Karsten Luebke, karsten.luebke@fom.de, Andrea Preusser
predict.svmlight,svm,
## Not run: 
## Only works if the svmlight binaries are in the path.
data(iris)
x <- svmlight(Species ~ ., data = iris)
## Using RBF-Kernel with gamma=0.1:
data(B3)
x <- svmlight(PHASEN ~ ., data = B3, svm.options = "-t 2 -g 0.1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.