NMI: NMI

Description Usage Arguments Details Value Examples

View source: R/external_cluster_validity.R

Description

Computes the Normalized Mutual Information betwen two partitions

Usage

1
NMI(clusters, classes)

Arguments

clusters

A vector of cluster assignments

classes

A vector giving the true classes of the objects

Details

This code comes directly from the package 'clue': https://github.com/cran/clue/blob/098da43010f3803294b4e8403328ee5c0216abf7/R/agreement.R#L161

Hornik K (2017). _clue: Cluster ensembles_. R package version 0.3-53, <URL: https://CRAN.R-project.org/package=clue>.

Hornik K (2005). “A CLUE for CLUster Ensembles.” _Journal of Statistical Software_, *14*(12). doi: 10.18637/jss.v014.i12 (URL: http://doi.org/10.18637/jss.v014.i12).

Value

Numeric

Examples

1
2
3
clusters <- c(0, 0, 2, 1, 1, 0, 1)
classes <- c("A", "A", "A", "B", "B", "A", "B")
NMI(clusters, classes)

chromswitch documentation built on Nov. 8, 2020, 5:24 p.m.