aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/coef.gensvm.grid.Rd2
-rw-r--r--man/gensvm.grid.Rd4
-rw-r--r--man/gensvm.refit.Rd2
-rw-r--r--man/plot.gensvm.grid.Rd2
-rw-r--r--man/predict.gensvm.grid.Rd2
-rw-r--r--man/print.gensvm.grid.Rd2
6 files changed, 14 insertions, 0 deletions
diff --git a/man/coef.gensvm.grid.Rd b/man/coef.gensvm.grid.Rd
index 744809f..48cf48d 100644
--- a/man/coef.gensvm.grid.Rd
+++ b/man/coef.gensvm.grid.Rd
@@ -18,11 +18,13 @@ The parameter grid of the GenSVMGrid object as a data frame.
Returns the parameter grid of a \code{gensvm.grid} object.
}
\examples{
+\dontrun{
x <- iris[, -5]
y <- iris[, 5]
grid <- gensvm.grid(x, y)
pg <- coef(grid)
+}
}
\references{
diff --git a/man/gensvm.grid.Rd b/man/gensvm.grid.Rd
index 147c044..a19b631 100644
--- a/man/gensvm.grid.Rd
+++ b/man/gensvm.grid.Rd
@@ -131,8 +131,10 @@ be the same as the param.grid in the input.
x <- iris[, -5]
y <- iris[, 5]
+\dontrun{
# use the default parameter grid
grid <- gensvm.grid(x, y, verbose=TRUE)
+}
# use a smaller parameter grid
pg <- expand.grid(p=c(1.0, 1.5, 2.0), kappa=c(-0.9, 1.0), epsilon=c(1e-3))
@@ -141,6 +143,7 @@ grid <- gensvm.grid(x, y, param.grid=pg)
# print the result
print(grid)
+\dontrun{
# Using a custom scoring function (accuracy as percentage)
acc.pct <- function(yt, yp) { return (100 * sum(yt == yp) / length(yt)) }
grid <- gensvm.grid(x, y, scoring=acc.pct)
@@ -149,6 +152,7 @@ grid <- gensvm.grid(x, y, scoring=acc.pct)
pg <- expand.grid(kernel=c('rbf'), gamma=c(1e-2, 1e-1, 1, 1e1, 1e2),
lambda=c(1e-8, 1e-6), max.iter=c(5000))
grid <- gensvm.grid(x, y, param.grid=pg, verbose=2)
+}
}
\references{
diff --git a/man/gensvm.refit.Rd b/man/gensvm.refit.Rd
index cae0646..aa260ca 100644
--- a/man/gensvm.refit.Rd
+++ b/man/gensvm.refit.Rd
@@ -73,9 +73,11 @@ y <- iris[, 5]
fit <- gensvm(x, y)
fit2 <- gensvm.refit(fit, x, y, epsilon=1e-8)
+\dontrun{
# refit a model returned by a grid search
grid <- gensvm.grid(x, y)
fit <- gensvm.refit(fit, x, y, epsilon=1e-8)
+}
# refit on different data
idx <- runif(nrow(x)) > 0.5
diff --git a/man/plot.gensvm.grid.Rd b/man/plot.gensvm.grid.Rd
index f23abda..a3aa4d9 100644
--- a/man/plot.gensvm.grid.Rd
+++ b/man/plot.gensvm.grid.Rd
@@ -20,11 +20,13 @@ model in the provided GenSVMGrid object. See the documentation for
\code{\link{plot.gensvm}} for more information.
}
\examples{
+\dontrun{
x <- iris[, -5]
y <- iris[, 5]
grid <- gensvm.grid(x, y)
plot(grid, x)
+}
}
\references{
diff --git a/man/predict.gensvm.grid.Rd b/man/predict.gensvm.grid.Rd
index 0c3cf2f..a61362e 100644
--- a/man/predict.gensvm.grid.Rd
+++ b/man/predict.gensvm.grid.Rd
@@ -27,6 +27,7 @@ this model is only available if \code{refit=TRUE} was specified in the
\code{\link{gensvm.grid}} call (the default).
}
\examples{
+\dontrun{
x <- iris[, -5]
y <- iris[, 5]
@@ -35,6 +36,7 @@ grid <- gensvm.grid(x, y)
# predict training sample
y.hat <- predict(grid, x)
+}
}
\references{
diff --git a/man/print.gensvm.grid.Rd b/man/print.gensvm.grid.Rd
index 0a5377d..1f19737 100644
--- a/man/print.gensvm.grid.Rd
+++ b/man/print.gensvm.grid.Rd
@@ -18,12 +18,14 @@ returns the object passed as input
Prints the summary of the fitted GenSVMGrid model
}
\examples{
+\dontrun{
x <- iris[, -5]
y <- iris[, 5]
# fit a grid search and print the resulting object
grid <- gensvm.grid(x, y)
print(grid)
+}
}
\references{