# NOT RUN {
## use iris data
data(iris)
X = as.matrix(iris[,1:4])
label = as.integer(iris$Species)
## connecting 10% and 25% of data for graph construction each.
output1 <- do.olpp(X,ndim=2,type=c("proportion",0.10))
output2 <- do.olpp(X,ndim=2,type=c("proportion",0.25))
## Visualize
# In theory, it should show two separated groups of data
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2))
plot(output1$Y, col=label, main="OLPP::10% connected")
plot(output2$Y, col=label, main="OLPP::25% connected")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab