From 93115020ec89c7f549ef5dab50e5270b09830894 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 30 Mar 2018 21:22:26 +0100 Subject: Update docs and remove xtrain from output list --- R/gensvm.R | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'R') diff --git a/R/gensvm.R b/R/gensvm.R index 41a08d7..0464322 100644 --- a/R/gensvm.R +++ b/R/gensvm.R @@ -4,7 +4,10 @@ #' with the given parameters. See the package documentation #' (\code{\link{gensvm-package}}) for more general information about GenSVM. #' -#' @param X data matrix with the predictors +#' @param x data matrix with the predictors. \cr\cr +#' Note that for SVMs categorical features should be converted to binary dummy +#' features. This can be done with using the \code{\link{model.matrix}} +#' function (i.e. \code{model.matrix( ~ var - 1)}). #' @param y class labels #' @param p parameter for the L_p norm of the loss function (1.0 <= p <= 2.0) #' @param lambda regularization parameter for the loss function (lambda > 0) @@ -56,9 +59,6 @@ #' \item{n.iter}{Number of iterations performed in training} #' \item{n.support}{Number of support vectors in the final model} #' \item{training.time}{Total training time} -#' \item{X.train}{When training with nonlinear kernels, the training data is -#' needed to perform prediction. For these kernels it is therefore stored in -#' the fitted model.} #' #' @note #' This function returns partial results when the computation is interrupted by @@ -182,8 +182,6 @@ gensvm <- function(X, y, p=1.0, lambda=1e-8, kappa=0.0, epsilon=1e-6, classes = classes, V = out$V, n.iter = out$n.iter, n.support = out$n.support, training.time = out$training.time, - X.train = if(kernel == 'linear') NULL else X, - feature.names = colnames(X)) class(object) <- "gensvm" return(object) -- cgit v1.2.3