Learn R Programming

twinsvm (version 0.0.1)

predict.svms: Predict from a Standard SVM

Description

Predict from a Standard SVM

Usage

# S3 method for svms
predict(object, newdata, decision.values = FALSE, ...)

Value

A factor of predicted classes, or a numeric vector when decision.values = TRUE.

Arguments

object

A fitted svms object.

newdata

Numeric matrix or data frame.

decision.values

If TRUE, return raw decision values instead of class labels.

...

Unused.

Examples

Run this code
set.seed(2)
dat <- gen_moons(30)
fit <- svms(dat$x, dat$y)
predict(fit, dat$x, decision.values = TRUE)

Run the code above in your browser using DataLab