# NOT RUN {
## generate swiss roll data
X = aux.gensamples()
## Compare PCA and BPCA
out1 <- do.pca(X, ndim=2, preprocess="center")
out2 <- do.bpca(X, ndim=2, preprocess="center")
## Visualize
par(mfrow=c(1,2))
plot(out1$Y[,1], out1$Y[,2], main="PCA")
plot(out2$Y[,1], out2$Y[,2], main="BPCA")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab