gensvm.accuracy {gensvm} | R Documentation |
Compute the accuracy score
Description
Compute the accuracy score between the true labels and the predicted labels.
Usage
gensvm.accuracy(y.true, y.pred)
Arguments
y.true |
vector of true labels |
y.pred |
vector of predicted labels |
Value
The accuracy as a value in the range [0.0, 1.0]
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
predict.gensvm.grid
, predict.gensvm
,
gensvm-package
Examples
x <- iris[, -5]
y <- iris[, 5]
fit <- gensvm(x, y)
gensvm.accuracy(predict(fit, x), y)
[Package gensvm version 0.1.7 Index]