powered by
calculates normalized mutual information, a metric that is commonly used to compare clustering results
NMI(g1, g2)
a vector of cluster labels
a vector of cluster labels (same length as g1)
NMI value
# NOT RUN { dt <- BlockModel.Gen(30,300,K=3,beta=0.2,rho=0.9,simple=FALSE,power=TRUE) A <- dt$A ssc <- reg.SSP(A,K=3,lap=TRUE) NMI(ssc$cluster,dt$g) # }
Run the code above in your browser using DataLab