predict.svms: Predict from a Standard SVM

View source: R/predict.R

predict.svmsR Documentation

Predict from a Standard SVM

Description

Predict from a Standard SVM

Usage

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

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.

Value

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

Examples

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

twinsvm documentation built on June 10, 2026, 1:06 a.m.