View source: R/predict.gensvm.grid.R
predict.gensvm.grid | R Documentation |
Predict class labels using the best model from a grid search.
After doing a grid search with the 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 refit=TRUE
was specified in the
gensvm.grid
call (the default).
## S3 method for class 'gensvm.grid' predict(object, newdata, ...)
object |
A |
newdata |
Matrix of new values for |
... |
further arguments are passed to predict.gensvm() |
a vector of class labels, with the same type as the original class labels provided to gensvm.grid()
Gerrit J.J. van den Burg, Patrick J.F. Groenen
Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com>
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.
gensvm
, predict.gensvm.grid
,
plot.gensvm
, gensvm-package
x <- iris[, -5] y <- iris[, 5] # run a grid search grid <- gensvm.grid(x, y) # predict training sample y.hat <- predict(grid, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.