aboutsummaryrefslogtreecommitdiff
path: root/man/plot.gensvm.Rd
diff options
context:
space:
mode:
Diffstat (limited to 'man/plot.gensvm.Rd')
-rw-r--r--man/plot.gensvm.Rd68
1 files changed, 68 insertions, 0 deletions
diff --git a/man/plot.gensvm.Rd b/man/plot.gensvm.Rd
new file mode 100644
index 0000000..b597e18
--- /dev/null
+++ b/man/plot.gensvm.Rd
@@ -0,0 +1,68 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/plot.gensvm.R
+\name{plot.gensvm}
+\alias{plot.gensvm}
+\title{Plot the simplex space of the fitted GenSVM model}
+\usage{
+\method{plot}{gensvm}(fit, x, y.true = NULL, with.margins = TRUE,
+ with.shading = TRUE, with.legend = TRUE, center.plot = TRUE, ...)
+}
+\arguments{
+\item{fit}{A fitted \code{gensvm} object}
+
+\item{x}{the dataset to plot}
+
+\item{y.true}{the true data labels. If provided the objects will be colored
+using the true labels instead of the predicted labels. This makes it easy to
+identify misclassified objects.}
+
+\item{with.margins}{plot the margins}
+
+\item{with.shading}{show shaded areas for the class regions}
+
+\item{with.legend}{show the legend for the class labels}
+
+\item{center.plot}{ensure that the boundaries and margins are always visible
+in the plot}
+
+\item{...}{further arguments are ignored}
+}
+\value{
+returns the object passed as input
+}
+\description{
+This function creates a plot of the simplex space for a fitted
+GenSVM model and the given data set, as long as the dataset consists of only
+3 classes. For more than 3 classes, the simplex space is too high
+dimensional to easily visualize.
+}
+\examples{
+x <- iris[, -5]
+y <- iris[, 5]
+
+# train the model
+fit <- gensvm(x, y)
+
+# plot the simplex space
+plot(fit, x)
+
+# plot and use the true colors (easier to spot misclassified samples)
+plot(fit, x, y.true=y)
+
+# plot only misclassified samples
+x.mis <- x[predict(fit, x) != y, ]
+y.mis.true <- y[predict(fit, x) != y, ]
+plot(fit, x.bad)
+plot(fit, x.bad, y.true=y.mis.true)
+
+}
+\author{
+Gerrit J.J. van den Burg, Patrick J.F. Groenen \cr
+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}.
+}
+