aboutsummaryrefslogtreecommitdiff
path: root/man/predict.gensvm.grid.Rd
blob: b16969a0273f4ac7ec4223910354118ed8ffb0d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.gensvm.grid.R
\name{predict.gensvm.grid}
\alias{predict.gensvm.grid}
\title{Predict class labels from the GenSVMGrid class}
\usage{
\method{predict}{gensvm.grid}(object, newdata, ...)
}
\arguments{
\item{object}{A \code{gensvm.grid} object trained with \code{refit=TRUE}}

\item{newdata}{Matrix of new values for \code{x} for which predictions need 
to be computed.}

\item{\dots}{further arguments are passed to predict.gensvm()}
}
\value{
a vector of class labels, with the same type as the original class 
labels provided to gensvm.grid()
}
\description{
Predict class labels using the best model from a grid search.  
After doing a grid search with the \code{\link{gensvm.grid}} function, this 
function can be used to make predictions of class labels. It uses the best 
GenSVM model found during the grid search to do the predictions. Note that 
this model is only available if \code{refit=TRUE} was specified in the 
\code{\link{gensvm.grid}} call (the default).
}
\examples{
\donttest{
x <- iris[, -5]
y <- iris[, 5]

# run a grid search
grid <- gensvm.grid(x, y)

# predict training sample
y.hat <- predict(grid, x)
}

}
\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}.
}
\seealso{
\code{\link{gensvm}}, \code{\link{predict.gensvm.grid}}, 
\code{\link{plot.gensvm}}, \code{\link{gensvm-package}}
}
\author{
Gerrit J.J. van den Burg, Patrick J.F. Groenen \cr
Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com>
}