# NOT RUN {
## load iris data
data(iris)
set.seed(100)
subid = sample(1:150,50)
X = as.matrix(iris[subid,1:4])
label = as.factor(iris[subid,5])
## compare with original SPE
outSPE <- do.spe(X, ndim=2)
out1 <- do.ispe(X, ndim=2, cutoff=0.5)
out2 <- do.ispe(X, ndim=2, cutoff=5)
out3 <- do.ispe(X, ndim=2, cutoff=50)
## Visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(2,2))
plot(outSPE$Y, pch=19, col=label, main="SPE")
plot(out1$Y, pch=19, col=label, main="ISPE::cutoff=0.5")
plot(out2$Y, pch=19, col=label, main="ISPE::cutoff=5")
plot(out3$Y, pch=19, col=label, main="ISPE::cutoff=50")
par(opar)
# }
Run the code above in your browser using DataLab