public class MEC<T> extends PartitionClustering<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.
k, size, y
OUTLIER
Constructor and Description |
---|
MEC(T[] data,
smile.math.distance.Distance<T> distance,
int k,
double radius)
Constructor.
|
MEC(T[] data,
smile.math.distance.Metric<T> distance,
int k,
double radius)
Constructor.
|
MEC(T[] data,
RNNSearch<T,T> nns,
int k,
double radius,
int[] y)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
entropy()
Returns the cluster conditional entropy.
|
double |
getRadius()
Returns the radius of neighborhood.
|
int |
predict(T x)
Cluster a new instance.
|
java.lang.String |
toString() |
getClusterLabel, getClusterSize, getNumClusters, seed, seed
public MEC(T[] data, smile.math.distance.Distance<T> distance, int k, double radius)
data
- the dataset for clustering.distance
- the distance measure for neighborhood search.k
- the number of clusters. Note that this is just a hint. The final
number of clusters may be less.radius
- the neighborhood radius.public MEC(T[] data, smile.math.distance.Metric<T> distance, int k, double radius)
data
- the dataset for clustering.distance
- the distance measure for neighborhood search.k
- the number of clusters. Note that this is just a hint. The final
number of clusters may be less.radius
- the neighborhood radius.public MEC(T[] data, RNNSearch<T,T> nns, int k, double radius, int[] y)
data
- the dataset for clustering.nns
- the neighborhood search data structure.k
- the number of clusters. Note that this is just a hint. The final
number of clusters may be less.radius
- the neighborhood radius.y
- the initial clustering labels, which could be produced by any
other clustering methods.public double entropy()
public double getRadius()
public int predict(T x)
x
- a new instance.Clustering.OUTLIER
.public java.lang.String toString()
toString
in class java.lang.Object