predict.svmlight: Interface to SVMlight

Description Usage Arguments Value Author(s) See Also Examples

View source: R/svmlight.R

Description

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

Usage

1
2
## S3 method for class 'svmlight'
predict(object, newdata, scal = TRUE, ...)

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.

...

...

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.

Author(s)

Karsten Luebke, [email protected]

See Also

svmlight, svm

Examples

1
2
3
4
5
6
## Not run: 
data(iris)
x <- svmlight(Species ~ ., data = iris)
predict(x, iris)

## End(Not run)

klaR documentation built on March 19, 2018, 5:03 p.m.