# NOT RUN {
## use iris data
data(iris)
X = as.matrix(iris[,1:4])+50
label = as.integer(iris$Species)
## use different preprocessing
out1 = do.npca(X, preprocess="center")
out2 = do.npca(X, preprocess="cscale")
out3 = do.npca(X, preprocess="whiten")
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, col=label, main="NPCA:: center")
plot(out2$Y, col=label, main="NPCA:: cscale")
plot(out3$Y, col=label, main="NPCA:: whiten")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab