aboutsummaryrefslogtreecommitdiff
path: root/man/predict.gensvm.Rd
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2018-03-27 12:31:28 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2018-03-27 12:31:28 +0100
commit004941896bac692d354c41a3334d20ee1d4627f7 (patch)
tree2b11e42d8524843409e2bf8deb4ceb74c8b69347 /man/predict.gensvm.Rd
parentupdates to GenSVM C library (diff)
downloadrgensvm-004941896bac692d354c41a3334d20ee1d4627f7.tar.gz
rgensvm-004941896bac692d354c41a3334d20ee1d4627f7.zip
GenSVM R package
Diffstat (limited to 'man/predict.gensvm.Rd')
-rw-r--r--man/predict.gensvm.Rd50
1 files changed, 50 insertions, 0 deletions
diff --git a/man/predict.gensvm.Rd b/man/predict.gensvm.Rd
new file mode 100644
index 0000000..0c55a43
--- /dev/null
+++ b/man/predict.gensvm.Rd
@@ -0,0 +1,50 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/predict.gensvm.R
+\name{predict.gensvm}
+\alias{predict}
+\alias{predict.gensvm}
+\title{Predict class labels with the GenSVM model}
+\usage{
+\method{predict}{gensvm}(fit, x.test, ...)
+}
+\arguments{
+\item{fit}{Fitted \code{gensvm} object}
+
+\item{x.test}{Matrix of new values for \code{x} for which predictions need
+to be made.}
+
+\item{\dots}{further arguments are ignored}
+}
+\value{
+a vector of class labels, with the same type as the original class
+labels.
+}
+\description{
+This function predicts the class labels of new data using a
+fitted GenSVM model.
+}
+\examples{
+x <- iris[, -5]
+y <- iris[, 5]
+
+# create a training and test sample
+attach(gensvm.train.test.split(x, y))
+fit <- gensvm(x.train, y.train)
+
+# predict the class labels of the test sample
+y.test.pred <- predict(fit, x.test)
+
+# compute the accuracy with gensvm.accuracy
+gensvm.accuracy(y.test, y.test.pred)
+
+}
+\author{
+Gerrit J.J. van den Burg, Patrick J.F. Groenen \cr
+Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com>
+}
+\references{
+Van den Burg, G.J.J. and Groenen, P.J.F. (2016). \emph{GenSVM: A Generalized
+Multiclass Support Vector Machine}, Journal of Machine Learning Research,
+17(225):1--42. URL \url{http://jmlr.org/papers/v17/14-526.html}.
+}
+