Learn R Programming

klaR (version 1.7-3)

predict.svmlight: Interface to SVMlight

Description

Predicts new observations using the SVM learned by the svmlight-function.

Usage

# S3 method for svmlight
predict(object, newdata, scal = TRUE, ...)

Value

If a classification is learned (type="C") in svmlight a list with elements ‘class’ and ‘posterior’ (scaled, if scal = TRUE).

If a Regression is learned (type="R") in svmlight the predicted values.

Arguments

object

Object of class svmlight.

newdata

Data frame (or matrix) of cases to be predicted.

scal

Logical, whether to scale membership values via e.scal.

...

...

Author

Karsten Luebke, karsten.luebke@fom.de

See Also

svmlight, svm

Examples

Run this code
if (FALSE) {
data(iris)
x <- svmlight(Species ~ ., data = iris)
predict(x, iris)
}

Run the code above in your browser using DataLab