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
55
56
|
#' @title Print the fitted GenSVM model
#'
#' @description Prints a short description of the fitted GenSVM model
#'
#' @param object A \code{gensvm} object to print
#' @param \dots further arguments are ignored
#'
#' @return returns the object passed as input
#'
#' @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}.
#'
#' @method print gensvm
#' @export
#'
#' @examples
#'
#'
print.gensvm <- function(object, ...)
{
cat("\nCall:\n")
dput(object$call)
cat("\nData:\n")
cat("\tn.objects:", object$n.objects, "\n")
cat("\tn.features:", object$n.features, "\n")
cat("\tn.classes:", object$n.classes, "\n")
cat("\tclasses:", object$classes, "\n")
cat("Parameters:\n")
cat("\tp:", object$p, "\n")
cat("\tlambda:", object$lambda, "\n")
cat("\tkappa:", object$kappa, "\n")
cat("\tepsilon:", object$epsilon, "\n")
cat("\tweights:", object$weights, "\n")
cat("\tmax.iter:", object$max.iter, "\n")
cat("\trandom.seed:", object$random.seed, "\n")
cat("\tkernel:", object$kernel, "\n")
if (object$kernel %in% c("poly", "rbf", "sigmoid")) {
cat("\tkernel.eigen.cutoff:", object$kernel.eigen.cutoff, "\n")
cat("\tgamma:", object$gamma, "\n")
}
if (object$kernel %in% c("poly", "sigmoid"))
cat("\tcoef:", object$coef, "\n")
if (object$kernel == 'poly')
cat("\tdegree:", object$degree, "\n")
cat("Results:\n")
cat("\tn.iter:", object$n.iter, "\n")
cat("\tn.support:", object$n.support, "\n")
invisible(object)
}
|