public class AdjustedMutualInformation extends java.lang.Object implements ClusterMeasure
Modifier and Type | Class and Description |
---|---|
static class |
AdjustedMutualInformation.Method
The normalization method.
|
Constructor and Description |
---|
AdjustedMutualInformation(AdjustedMutualInformation.Method method)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static double |
max(int[] y1,
int[] y2)
Calculates the adjusted mutual information of (I(y1, y2) - E(MI)) / (max(H(y1), H(y2)) - E(MI)).
|
double |
measure(int[] y1,
int[] y2)
Returns an index to measure the quality of clustering.
|
static double |
min(int[] y1,
int[] y2)
Calculates the adjusted mutual information of (I(y1, y2) - E(MI)) / (min(H(y1), H(y2)) - E(MI)).
|
static double |
sqrt(int[] y1,
int[] y2)
Calculates the adjusted mutual information of (I(y1, y2) - E(MI)) / (sqrt(H(y1) * H(y2)) - E(MI)).
|
static double |
sum(int[] y1,
int[] y2)
Calculates the adjusted mutual information of (I(y1, y2) - E(MI)) / (0.5 * (H(y1) + H(y2)) - E(MI)).
|
java.lang.String |
toString() |
public AdjustedMutualInformation(AdjustedMutualInformation.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 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