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