View source: R/FUNC_AMI_calculations.R
Mutual_Information | R Documentation |
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.
Mutual_Information(v1, v2)
v1 |
vector containing first classification labels |
v2 |
vector containing second classification labels |
See these links for a more formal definition of AMI and NMI.
Returns mutual information:
nmi | NMI value |
ami | AMI value |
cluster1 <- sample(1:5, size = 10, replace = TRUE) cluster2 <- sample(1:2, size = 10, replace = TRUE) Mutual_Information(cluster1, cluster2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.