# NOT RUN {
## generate data of 3 types with clear difference
dt1 = aux.gensamples(n=20)-50
dt2 = aux.gensamples(n=20)
dt3 = aux.gensamples(n=20)+50
lab = rep(1:3, each=20)
## merge the data
X = rbind(dt1,dt2,dt3)
## try different numbers for neighborhood size
out1 = do.cnpe(X, type=c("proportion",0.10))
out2 = do.cnpe(X, type=c("proportion",0.25))
out3 = do.cnpe(X, type=c("proportion",0.50))
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, col=lab, pch=19, main="CNPE::10% connected")
plot(out2$Y, col=lab, pch=19, main="CNPE::25% connected")
plot(out3$Y, col=lab, pch=19, main="CNPE::50% connected")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab