Title: | Normalized Mutual Information of Community Structure in Network |
---|---|
Description: | Calculates the normalized mutual information (NMI) of two community structures in network analysis. |
Authors: | Tianhao Wu [aut, cre] |
Maintainer: | Tianhao Wu <[email protected]> |
License: | GNU General Public License version 2 |
Version: | 2.0 |
Built: | 2024-11-12 06:30:38 UTC |
Source: | CRAN |
Calculates the normalized mutual information (NMI) of two community structures in network analysis.
NMI(X,Y)
NMI(X,Y)
X |
a data frame or matrix whose first column is the node id and the second column is module |
Y |
a data frame or matrix whose first column is the node id and the second column is module |
value |
value of NMI |
# Suppose X and Y are exactly the same X<-data.frame(c(1,2,3),c(2,1,1)) Y<-X # There NMI is 1 NMI(X,Y) # Suppose X and Y are completely independent X<-data.frame(c(1,2,3),c(2,1,1)) Y<-data.frame(c(5,6,7),c(2,1,1)) # There NMI is 0 NMI(X,Y)
# Suppose X and Y are exactly the same X<-data.frame(c(1,2,3),c(2,1,1)) Y<-X # There NMI is 1 NMI(X,Y) # Suppose X and Y are completely independent X<-data.frame(c(1,2,3),c(2,1,1)) Y<-data.frame(c(5,6,7),c(2,1,1)) # There NMI is 0 NMI(X,Y)