diff options
Diffstat (limited to 'man')
| -rw-r--r-- | man/gensvm.Rd | 5 | ||||
| -rw-r--r-- | man/gensvm.grid.Rd | 4 | ||||
| -rw-r--r-- | man/plot.gensvm.Rd | 23 | ||||
| -rw-r--r-- | man/plot.gensvm.grid.Rd | 6 | ||||
| -rw-r--r-- | man/predict.gensvm.Rd | 8 |
5 files changed, 24 insertions, 22 deletions
diff --git a/man/gensvm.Rd b/man/gensvm.Rd index 5aabcaa..e48444f 100644 --- a/man/gensvm.Rd +++ b/man/gensvm.Rd @@ -24,8 +24,9 @@ function (i.e. \code{model.matrix( ~ var - 1)}).} \item{kappa}{parameter for the hinge function in the loss function (kappa > -1.0)} -\item{weights}{type of instance weights to use. Options are 'unit' for unit -weights and 'group' for group size correction weight (eq. 4 in the paper).} +\item{weights}{type or vector of instance weights to use. Options are 'unit' +for unit weights and 'group' for group size correction weights (eq. 4 in the +paper). Alternatively, a vector of weights can be provided.} \item{kernel}{the kernel type to use in the classifier. It must be one of 'linear', 'poly', 'rbf', or 'sigmoid'. See the section "Kernels in GenSVM" diff --git a/man/gensvm.grid.Rd b/man/gensvm.grid.Rd index cc44286..b365e10 100644 --- a/man/gensvm.grid.Rd +++ b/man/gensvm.grid.Rd @@ -4,11 +4,11 @@ \alias{gensvm.grid} \title{Cross-validated grid search for GenSVM} \usage{ -gensvm.grid(X, y, param.grid = "tiny", refit = TRUE, scoring = NULL, +gensvm.grid(x, y, param.grid = "tiny", refit = TRUE, scoring = NULL, cv = 3, verbose = 0, return.train.score = TRUE) } \arguments{ -\item{X}{training data matrix. We denote the size of this matrix by +\item{x}{training data matrix. We denote the size of this matrix by n_samples x n_features.} \item{y}{training vector of class labes of length n_samples. The number of diff --git a/man/plot.gensvm.Rd b/man/plot.gensvm.Rd index a958c4d..9c15bea 100644 --- a/man/plot.gensvm.Rd +++ b/man/plot.gensvm.Rd @@ -4,18 +4,15 @@ \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, +\method{plot}{gensvm}(fit, y, x.test = NULL, with.margins = TRUE, with.shading = TRUE, with.legend = TRUE, center.plot = TRUE, xlim = NULL, ylim = NULL, ...) } \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{y}{the labels to color points with (if NULL the predicted labels are +used)} \item{with.margins}{plot the margins} @@ -34,6 +31,8 @@ bounds will be used for the vertical axis and the value of center.plot will be ignored} \item{...}{further arguments are passed to the builtin plot() function} + +\item{x}{the dataset to plot (if NULL the training data is used)} } \value{ returns the object passed as input @@ -52,16 +51,16 @@ y <- iris[, 5] fit <- gensvm(x, y) # plot the simplex space -plot(fit, x) +plot(fit) # plot and use the true colors (easier to spot misclassified samples) -plot(fit, x, y.true=y) +plot(fit, y) # plot only misclassified samples -x.mis <- x[predict(fit, x) != y, ] -y.mis.true <- y[predict(fit, x) != y] -plot(fit, x.mis) -plot(fit, x.mis, y.true=y.mis.true) +x.mis <- x[predict(fit) != y, ] +y.mis.true <- y[predict(fit) != y] +plot(fit, x.test=x.mis) +plot(fit, y.mis.true, x.test=x.mis) } \author{ diff --git a/man/plot.gensvm.grid.Rd b/man/plot.gensvm.grid.Rd index 0db01ec..3e5ef39 100644 --- a/man/plot.gensvm.grid.Rd +++ b/man/plot.gensvm.grid.Rd @@ -4,14 +4,14 @@ \alias{plot.gensvm.grid} \title{Plot the simplex space of the best fitted model in the GenSVMGrid} \usage{ -\method{plot}{gensvm.grid}(grid, x, ...) +\method{plot}{gensvm.grid}(grid, ...) } \arguments{ \item{grid}{A \code{gensvm.grid} object trained with refit=TRUE} -\item{x}{the dataset to plot} - \item{...}{further arguments are passed to the plot function} + +\item{x}{the dataset to plot} } \value{ returns the object passed as input diff --git a/man/predict.gensvm.Rd b/man/predict.gensvm.Rd index 2881e26..0b82662 100644 --- a/man/predict.gensvm.Rd +++ b/man/predict.gensvm.Rd @@ -5,13 +5,15 @@ \alias{predict.gensvm} \title{Predict class labels with the GenSVM model} \usage{ -\method{predict}{gensvm}(fit, x.test, ...) +\method{predict}{gensvm}(fit, newdata, add.rownames = FALSE, ...) } \arguments{ \item{fit}{Fitted \code{gensvm} object} -\item{x.test}{Matrix of new values for \code{x} for which predictions need -to be made.} +\item{newdata}{Matrix of new data for which predictions need to be made.} + +\item{add.rownames}{add the rownames from the training data to the +predictions} \item{\dots}{further arguments are ignored} } |
