public class NormalizedMutualInformation extends java.lang.Object implements ClusterMeasure
Modifier and Type | Class and Description |
---|---|
static class |
NormalizedMutualInformation.Method
The normalization method.
|
Constructor and Description |
---|
NormalizedMutualInformation(NormalizedMutualInformation.Method method)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static double |
joint(int[] y1,
int[] y2)
Calculates the normalized mutual information of I(y1, y2) / H(y1, y2).
|
static double |
max(int[] y1,
int[] y2)
Calculates the normalized mutual information of I(y1, y2) / max(H(y1), H(y2)).
|
double |
measure(int[] y1,
int[] y2)
Returns an index to measure the quality of clustering.
|
static double |
min(int[] y1,
int[] y2)
Calculates the normalized mutual information of I(y1, y2) / min(H(y1), H(y2)).
|
static double |
sqrt(int[] y1,
int[] y2)
Calculates the normalized mutual information of I(y1, y2) / sqrt(H(y1) * H(y2)).
|
static double |
sum(int[] y1,
int[] y2)
Calculates the normalized mutual information of 2 * I(y1, y2) / (H(y1) + H(y2)).
|
java.lang.String |
toString() |
public NormalizedMutualInformation(NormalizedMutualInformation.Method method)
method
- the normalization method.public double measure(int[] y1, int[] y2)
ClusterMeasure
measure
in interface ClusterMeasure
y1
- the cluster labels.y2
- the alternative cluster labels.public static double joint(int[] y1, int[] y2)
public static double max(int[] y1, int[] y2)
public static double sum(int[] y1, int[] y2)
public static double sqrt(int[] y1, int[] y2)
public static double min(int[] y1, int[] y2)
public java.lang.String toString()
toString
in class java.lang.Object