NMI {NMI}R Documentation

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)

[Package NMI version 2.0 Index]