aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2018-04-05 11:52:48 -0400
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2018-04-05 11:52:48 -0400
commit8cfaa3e50d6b96605b9efbc37d1b628bac29f324 (patch)
tree7521d2d1165bf1efe3d2d8b255e69389e14787f5
parentupdate submodule (diff)
downloadrgensvm-8cfaa3e50d6b96605b9efbc37d1b628bac29f324.tar.gz
rgensvm-8cfaa3e50d6b96605b9efbc37d1b628bac29f324.zip
make examples faster
-rw-r--r--R/gensvm.R4
-rw-r--r--R/plot.gensvm.R2
-rw-r--r--man/gensvm.Rd4
-rw-r--r--man/plot.gensvm.Rd2
4 files changed, 6 insertions, 6 deletions
diff --git a/R/gensvm.R b/R/gensvm.R
index db023e2..c541b5a 100644
--- a/R/gensvm.R
+++ b/R/gensvm.R
@@ -107,8 +107,8 @@
#' fit <- gensvm(x, y, max.iter=1000)
#'
#' # Nonlinear training
-#' fit <- gensvm(x, y, kernel='rbf')
-#' fit <- gensvm(x, y, kernel='poly', degree=2, gamma=1.0)
+#' fit <- gensvm(x, y, kernel='rbf', max.iter=5000)
+#' fit <- gensvm(x, y, kernel='poly', degree=2, gamma=1.0, max.iter=5000)
#'
#' # Setting the random seed and comparing results
#' fit <- gensvm(x, y, random.seed=123)
diff --git a/R/plot.gensvm.R b/R/plot.gensvm.R
index 054c374..500adf5 100644
--- a/R/plot.gensvm.R
+++ b/R/plot.gensvm.R
@@ -66,7 +66,7 @@
#' # plot a 2-d model
#' xx <- x[y %in% c('versicolor', 'virginica'), ]
#' yy <- y[y %in% c('versicolor', 'virginica')]
-#' fit <- gensvm(xx, yy, kernel='rbf', max.iter=5000)
+#' fit <- gensvm(xx, yy, kernel='rbf', max.iter=1000)
#' plot(fit)
#'
plot.gensvm <- function(x, labels, newdata=NULL, with.margins=TRUE,
diff --git a/man/gensvm.Rd b/man/gensvm.Rd
index 4f5d614..cee2b35 100644
--- a/man/gensvm.Rd
+++ b/man/gensvm.Rd
@@ -115,8 +115,8 @@ fit <- gensvm(x, y, epsilon=1e-3)
fit <- gensvm(x, y, max.iter=1000)
# Nonlinear training
-fit <- gensvm(x, y, kernel='rbf')
-fit <- gensvm(x, y, kernel='poly', degree=2, gamma=1.0)
+fit <- gensvm(x, y, kernel='rbf', max.iter=5000)
+fit <- gensvm(x, y, kernel='poly', degree=2, gamma=1.0, max.iter=5000)
# Setting the random seed and comparing results
fit <- gensvm(x, y, random.seed=123)
diff --git a/man/plot.gensvm.Rd b/man/plot.gensvm.Rd
index 6e19228..dc4ca38 100644
--- a/man/plot.gensvm.Rd
+++ b/man/plot.gensvm.Rd
@@ -66,7 +66,7 @@ plot(fit, y.mis.true, newdata=x.mis)
# plot a 2-d model
xx <- x[y \%in\% c('versicolor', 'virginica'), ]
yy <- y[y \%in\% c('versicolor', 'virginica')]
-fit <- gensvm(xx, yy, kernel='rbf', max.iter=5000)
+fit <- gensvm(xx, yy, kernel='rbf', max.iter=1000)
plot(fit)
}