public class XMeans extends CentroidClustering<double[],double[]>
KMeans,
GMeans,
Serialized Formcentroids, distance, distortionk, OUTLIER, size, y| Constructor and Description |
|---|
XMeans(double distortion,
double[][] centroids,
int[] y)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static XMeans |
fit(double[][] data,
int kmax)
Clustering data with the number of clusters
determined by X-Means algorithm automatically.
|
static XMeans |
fit(double[][] data,
int kmax,
int maxIter,
double tol)
Clustering data with the number of clusters
determined by X-Means algorithm automatically.
|
compareTo, predict, toStringrun, seedpublic XMeans(double distortion,
double[][] centroids,
int[] y)
distortion - the total distortion.centroids - the centroids of each cluster.y - the cluster labels.public static XMeans fit(double[][] data, int kmax)
data - the input data of which each row is an observation.kmax - the maximum number of clusters.public static XMeans fit(double[][] data, int kmax, int maxIter, double tol)
data - the input data of which each row is an observation.kmax - the maximum number of clusters.maxIter - the maximum number of iterations for k-means.tol - the tolerance of k-means convergence test.