# NOT RUN {
## use iris data
data(iris)
X = as.matrix(iris[,1:4])
label = as.integer(iris$Species)
## test different tolerance levels
out1 <- do.spp(X,ndim=2,reltol=0.001)
out2 <- do.spp(X,ndim=2,reltol=0.01)
out3 <- do.spp(X,ndim=2,reltol=0.1)
# visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, col=label, main="SPP::reltol=.001")
plot(out2$Y, col=label, main="SPP::reltol=.01")
plot(out3$Y, col=label, main="SPP::reltol=.1")
par(opar)
# }
Run the code above in your browser using DataLab