Predicts new observations using the SVM learned by
the svmlight
-function.
# S3 method for svmlight
predict(object, newdata, scal = TRUE, ...)
Object of class svmlight
.
Data frame (or matrix) of cases to be predicted.
Logical, whether to scale membership values via e.scal
.
…
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.
# NOT RUN { data(iris) x <- svmlight(Species ~ ., data = iris) predict(x, iris) # }