# NOT RUN {
## generate ribbon-shaped data
## in order to pass CRAN pretest, n is set to be small.
set.seed(100)
X = aux.gensamples(dname="ribbon",n=25)
## Compare MVU and MVE
# Note that MVE actually requires much larger number of iterations
# Here, due to CRAN limit, it was set as 7.
outMVU5 <- do.mvu(X, ndim=2, type=c("knn",5), projtype="kpca")
outMVE5 <- do.mve(X, ndim=2, knn=5, maxiter=7)
## Visualize two comparisons
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2))
plot(outMVU5$Y, main="MVU (k=5)")
plot(outMVE5$Y, main="MVE (k=5)")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab