Class MEC<T>
- Type Parameters:
T
- the data type of model input objects.
- All Implemented Interfaces:
Serializable
,Comparable<MEC<T>>
The clustering criterion is based on the conditional entropy H(C | x), where C is the cluster label and x is an observation. According to Fano's inequality, we can estimate C with a low probability of error only if the conditional entropy H(C | X) is small. MEC also generalizes the criterion by replacing Shannon's entropy with Havrda-Charvat's structural α-entropy. Interestingly, the minimum entropy criterion based on structural α-entropy is equal to the probability error of the nearest neighbor method when α= 2. To estimate p(C | x), MEC employs Parzen density estimation, a nonparametric approach.
MEC is an iterative algorithm starting with an initial partition given by any other clustering methods, e.g. k-means, CLARNAS, hierarchical clustering, etc. Note that a random initialization is NOT appropriate.
References
- Haifeng Li. All rights reserved., Keshu Zhang, and Tao Jiang. Minimum Entropy Clustering and Applications to Gene Expression Analysis. CSB, 2004.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
double
entropy()
Returns the conditional entropy of clusters.static <T> MEC
<T> Clustering the data.static <T> MEC
<T> fit
(T[] data, RNNSearch<T, T> nns, int[] group, MEC.Options options) Clustering the data.int
Cluster a new instance.double
radius()
Returns the neighborhood radius.toString()
-
Constructor Details
-
MEC
Constructor.- Parameters:
k
- the number of clusters.group
- the cluster labels.entropy
- the conditional entropy of clusters.radius
- the neighborhood radius.nns
- the data structure for neighborhood search.
-
-
Method Details
-
entropy
public double entropy()Returns the conditional entropy of clusters.- Returns:
- the conditional entropy of clusters.
-
radius
public double radius()Returns the neighborhood radius.- Returns:
- the neighborhood radius.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-
fit
Clustering the data.- Type Parameters:
T
- the data type.- Parameters:
data
- the observations.distance
- the distance function.k
- the number of clusters. Note that this is just a hint. The final number of clusters may be less.radius
- the neighborhood radius.- Returns:
- the model.
-
fit
Clustering the data.- Type Parameters:
T
- the data type.- Parameters:
data
- the observations.nns
- the neighborhood search data structure.group
- the initial clustering assignment.options
- the hyperparameters.- Returns:
- the model.
-
predict
Cluster a new instance.- Parameters:
x
- a new instance.- Returns:
- the cluster label. Note that it may be
Clustering.OUTLIER
.
-
toString
- Overrides:
toString
in classPartitioning
-