aboutsummaryrefslogtreecommitdiff
path: root/man/gensvm.grid.Rd
diff options
context:
space:
mode:
Diffstat (limited to 'man/gensvm.grid.Rd')
-rw-r--r--man/gensvm.grid.Rd4
1 files changed, 4 insertions, 0 deletions
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{