Mutual_Information: Mutual_Information

Description Usage Arguments Details Value Examples

View source: R/FUNC_AMI_calculations.R

Description

Calculates normalized mutual information and adjusted mutual information. The value for both will be a value bewteen 0 and 1 that measures how close the classification between the two clusters is. A value closer to 1 means the labels are more similar across v1 and v2, and a value closer to 0 means the labels are not as similar.

Usage

1

Arguments

v1

vector containing first classification labels

v2

vector containing second classification labels

Details

See these links for a more formal definition of AMI and NMI.

Value

Returns mutual information:

nmi NMI value
ami AMI value

Examples

1
2
3
cluster1 <- sample(1:5, size = 10, replace = TRUE)
cluster2 <- sample(1:2, size = 10, replace = TRUE)
Mutual_Information(cluster1, cluster2)

rshudde/RJcluster documentation built on April 26, 2021, 5:21 p.m.