public class KModes extends CentroidClustering<int[],int[]>
KMeans,
Serialized Formcentroids, distortionk, OUTLIER, size, y| Constructor and Description |
|---|
KModes(double distortion,
int[][] centroids,
int[] y)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distance(int[] x,
int[] y)
The distance function.
|
static KModes |
fit(int[][] data,
int k)
Fits k-modes clustering.
|
static KModes |
fit(int[][] data,
int k,
int maxIter)
Fits k-modes clustering.
|
compareTo, predict, toStringrun, seedpublic KModes(double distortion,
int[][] centroids,
int[] y)
distortion - the total distortion.centroids - the centroids of each cluster.y - the cluster labels.public double distance(int[] x,
int[] y)
CentroidClusteringdistance in class CentroidClustering<int[],int[]>public static KModes fit(int[][] data, int k)
data - the input data of which each row is an observation.k - the number of clusters.public static KModes fit(int[][] data, int k, int maxIter)
data - the input data of which each row is an observation.k - the number of clusters.maxIter - the maximum number of iterations.