library(mbstructure)
data(MBconnectome)
out <- generate.graph(newrdat, vdf.right)
g <- out$g
vdf <- out$vdf
dmax <- 50
Xhat <- doEmbed(g, dmax)
suppressMessages(library(mclust))
Kmax <- 19
mc <- Mclust(Xhat, 1:Kmax)
vdf$cluster <- factor(mc$class)
plotBIC(mc)
plotClustering(Xhat, mc, vdf)
table(type=vdf$type,Khat6=vdf$cluster)
## Khat6
## type 1 2 3 4 5 6
## KC 25 57 0 16 2 0
## MBIN 0 1 19 1 0 0
## MBON 0 0 0 1 0 28
## PN 0 0 0 2 61 0
table(claw=vdf$claw,Khat6=vdf$cluster)
## Khat6
## claw 1 2 3 4 5 6
## 0 0 10 0 16 2 0
## 1 15 4 0 0 0 0
## 2 7 4 0 0 0 0
## 3 0 15 0 0 0 0
## 4 3 13 0 0 0 0
## 5 0 8 0 0 0 0
## 6 0 3 0 0 0 0