public class KMeansComputeJob extends java.lang.Object implements Twister2Worker
Modifier and Type | Class and Description |
---|---|
static class |
KMeansComputeJob.CentroidAggregator
This class aggregates the cluster centroid values and sum the new centroid values.
|
static class |
KMeansComputeJob.KMeansAllReduceTask |
static class |
KMeansComputeJob.KMeansSourceTask |
Constructor and Description |
---|
KMeansComputeJob() |
Modifier and Type | Method and Description |
---|---|
static ComputeGraph |
buildCentroidsTG(java.lang.String centroidDirectory,
int csize,
int parallelismValue,
int dimension,
Config conf,
java.lang.String filetype) |
static ComputeGraph |
buildDataPointsTG(java.lang.String dataDirectory,
int dsize,
int parallelismValue,
int dimension,
Config conf,
java.lang.String filetype) |
static ComputeGraph |
buildKMeansTG(int parallelismValue,
Config conf) |
void |
execute(WorkerEnvironment workerEnv)
First, the execute method invokes the generateDataPoints method to generate the datapoints file
and centroid file based on the respective filesystem submitted by the user.
|
public void execute(WorkerEnvironment workerEnv)
execute
in interface Twister2Worker
public static ComputeGraph buildDataPointsTG(java.lang.String dataDirectory, int dsize, int parallelismValue, int dimension, Config conf, java.lang.String filetype)
public static ComputeGraph buildCentroidsTG(java.lang.String centroidDirectory, int csize, int parallelismValue, int dimension, Config conf, java.lang.String filetype)
public static ComputeGraph buildKMeansTG(int parallelismValue, Config conf)