diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2018-02-09 16:34:57 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2018-02-09 16:34:57 +0000 |
| commit | 381266b57b48e8005099b4ea5762d08455c2e5ba (patch) | |
| tree | 904fd9c0fa37ec30791a2dd5644f1fd67c5515b7 /R/predict.gensvm.R | |
| download | rgensvm-381266b57b48e8005099b4ea5762d08455c2e5ba.tar.gz rgensvm-381266b57b48e8005099b4ea5762d08455c2e5ba.zip | |
initial commit
Diffstat (limited to 'R/predict.gensvm.R')
| -rw-r--r-- | R/predict.gensvm.R | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/R/predict.gensvm.R b/R/predict.gensvm.R new file mode 100644 index 0000000..6cc8851 --- /dev/null +++ b/R/predict.gensvm.R @@ -0,0 +1,36 @@ +#' @title Predict class labels with the GenSVM model +#' +#' @description This function predicts the class labels of new data using a +#' fitted GenSVM model. +#' +#' @param object Fitted \code{gensvm} object +#' @param newx Matrix of new values for \code{x} for which predictions need to +#' be made. +#' @param \dots further arguments are ignored +#' +#' @return a vector of class labels, with the same type as the original class +#' labels. +#' +#' @export +#' @aliases predict +#' +#' @author +#' 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). \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}. +#' +#' @examples +#' +#' +#' +predict.gensvm <- function(object, newx, ...) +{ + # TODO: C library fitting prediction here (or not? with the column-major + # order it may be faster to do it directly in R) + + return(yhat) +} |
