# NOT RUN {
## load iris data
data(iris)
set.seed(100)
subid = sample(1:150,50)
X = as.matrix(iris[subid,1:4])
label = as.factor(iris[subid,5])
## try different preprocessing
out1 <- do.bmds(X, ndim=2, preprocess="center")
out2 <- do.bmds(X, ndim=2, preprocess="cscale")
out3 <- do.bmds(X, ndim=2, preprocess="decorrelate")
## embeddings for each procedure
Y1 <- out1$Y; Y2 <- out2$Y; Y3 <- out3$Y
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(Y1, main="BMDS::iter=5", col=label, pch=19)
plot(Y2, main="BMDS::iter=10", col=label, pch=19)
plot(Y3, main="BMDS::iter=50", col=label, pch=19)
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab