fitted.gensvm: Show fitted labels for the GenSVM model

View source: R/fitted.gensvm.R

fitted.gensvmR Documentation

Show fitted labels for the GenSVM model

Description

This function shows the fitted class labels of training data using a fitted GenSVM model.

Usage

## S3 method for class 'gensvm'
fitted(object, ...)

Arguments

object

Fitted gensvm object

...

further arguments are passed to predict

Value

a vector of class labels, with the same type as the original class labels.

Author(s)

Gerrit J.J. van den Burg, Patrick J.F. Groenen
Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com>

References

Van den Burg, G.J.J. and Groenen, P.J.F. (2016). GenSVM: A Generalized Multiclass Support Vector Machine, Journal of Machine Learning Research, 17(225):1–42. URL https://jmlr.org/papers/v17/14-526.html.

See Also

plot.gensvm, predict.gensvm.grid, gensvm, gensvm-package

Examples

x <- iris[, -5]
y <- iris[, 5]

# fit GenSVM and compute training set predictions
fit <- gensvm(x, y)
yhat <- fitted(fit)

# compute the accuracy with gensvm.accuracy
gensvm.accuracy(y, yhat)


gensvm documentation built on Feb. 16, 2023, 5:58 p.m.