# NOT RUN {
## generate data of 2 types with clear difference
set.seed(100)
diff = 50
dt1 = aux.gensamples(n=50)-diff;
dt2 = aux.gensamples(n=50)+diff;
## merge the data and create a label correspondingly
Y = rbind(dt1,dt2)
label = rep(1:2, each=50)
## compare LPP, SLPP and ESLPP
outLPP <- do.lpp(Y)
outSLPP <- do.slpp(Y, label)
outESLPP <- do.eslpp(Y, label)
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(outLPP$Y, col=label, pch=19, main="LPP")
plot(outSLPP$Y, col=label, pch=19, main="SLPP")
plot(outESLPP$Y, col=label, pch=19, main="ESLPP")
par(opar)
# }
Run the code above in your browser using DataLab