NMI {chromswitch} | R Documentation

## NMI

### Description

Computes the Normalized Mutual Information betwen two partitions

### Usage

    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

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

[Package chromswitch version 1.2.1 Index]