NMI: calculates normalized mutual information

View source: R/RCode.R

NMIR Documentation

calculates normalized mutual information

Description

calculates normalized mutual information, a metric that is commonly used to compare clustering results

Usage

NMI(g1, g2)

Arguments

g1

a vector of cluster labels

g2

a vector of cluster labels (same length as g1)

Value

NMI value

Author(s)

Tianxi Li, Elizaveta Levina, Ji Zhu
Maintainer: Tianxi Li tianxili@virginia.edu

Examples


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)



randnet documentation built on May 31, 2023, 6:44 p.m.