| Title: | Normalized Mutual Information of Community Structure in Network |
| Version: | 2.0 |
| Description: | Calculates the normalized mutual information (NMI) of two community structures in network analysis. |
| Depends: | R (≥ 3.2.2) |
| License: | GNU General Public License version 2 |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 5.0.1 |
| NeedsCompilation: | no |
| Packaged: | 2016-08-20 10:54:43 UTC; tianhaowu |
| Author: | Tianhao Wu [aut, cre] |
| Maintainer: | Tianhao Wu <tianhao.wu@yale.edu> |
| Repository: | CRAN |
| Date/Publication: | 2016-08-20 15:36:57 |
Normalized Mutual Information of Community Structure in Network
Description
Calculates the normalized mutual information (NMI) of two community structures in network analysis.
Usage
NMI(X,Y)
Arguments
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 |
value of NMI |
Examples
# 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)