public final class KMeansUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double[][] |
findNearestCenter(int dim,
double[][] datapoints,
double[][] centers)
This method first invoke the euclidean distance between to calculate the distance between the
data points assigned to the task (i.e from start index to end index) and the centroid values.
|
static void |
generateDataPoints(Config config,
int dim,
int numFiles,
int datasize,
int centroidsize,
java.lang.String dinputDirectory,
java.lang.String cinputDirectory,
java.lang.String type)
This method is to generate the datapoints and centroids based on the user submitted values.
|
public static void generateDataPoints(Config config, int dim, int numFiles, int datasize, int centroidsize, java.lang.String dinputDirectory, java.lang.String cinputDirectory, java.lang.String type)
public static double[][] findNearestCenter(int dim, double[][] datapoints, double[][] centers)