library(simone)
## Simulate a data set with obvious structure
p <- 200
n <- 1
proba.in <- 0.2
proba.out <- 0.01
alpha <- c(.5,.3,.2)
X <- SimDataAffiliation (p, n, proba.in, proba.out, alpha, proba.dust=0.2)
## estimate vertex classification
res <- InferClasses(X$K.theo, 3)
## See results
par(mfrow=c(2,2))
Mplot(X$K.theo, X$cl.theo, main="Theoretical classification")
Mplot(X$K.theo, res$cl, main="IC classification")
g1 <- Gplot(X$K.theo, X$cl.theo, main="Theoretical classification")
g2 <- Gplot(X$K.theo, res$cl, main="IC classification", coord=g1)
print(table(X$cl.theo,res$cl))
Run the code above in your browser using DataLab