# NOT RUN {
## generate data
X <- rbind(matrix(rnorm(100),nr=10),matrix(rnorm(100),nr=10)+10)
## 1. projection onto 2 dimension.
output1 <- do.mds(X,ndim=2)
## 2. different preprocessing leads to different results
output2 <- do.mds(X,ndim=2,preprocess="decorrelate")
output3 <- do.mds(X,ndim=2,preprocess="whiten")
## 3. visualize
par(mfrow=c(1,3))
plot(output1$Y[,1],output1$Y[,2],main="center")
plot(output2$Y[,1],output2$Y[,2],main="decorrelate")
plot(output3$Y[,1],output3$Y[,2],main="whiten")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab