protected static class KMeansCompare.Instance extends AbstractKMeans.Instance
Modifier and Type | Field and Description |
---|---|
(package private) double[][] |
cdist
Cluster center distances.
|
assignment, clusters, isSquared, k, key, means, relation, varsum
Constructor and Description |
---|
Instance(Relation<? extends NumberVector> relation,
NumberVectorDistanceFunction<?> df,
double[][] means)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
assignToNearestCluster()
Assign each object to the nearest cluster.
|
protected Logging |
getLogger()
Get the class logger.
|
protected int |
iterate(int iteration)
Main loop function.
|
protected void |
recomputeSeperation(double[][] means,
double[][] cdist)
Recompute the separation of cluster means.
|
buildResult, buildResult, copyMeans, distance, isSquared, meansFromSums, movedDistance, recomputeSeperation, run
public Instance(Relation<? extends NumberVector> relation, NumberVectorDistanceFunction<?> df, double[][] means)
relation
- Relationdf
- Distance functionmeans
- Initial meansprotected int iterate(int iteration)
AbstractKMeans.Instance
iterate
in class AbstractKMeans.Instance
iteration
- Iteration number (beginning at 1)protected void recomputeSeperation(double[][] means, double[][] cdist)
Used by Sort and Compare variants.
means
- Meanscdist
- Center-to-Center distances (half-sqrt scaled)protected int assignToNearestCluster()
AbstractKMeans.Instance
assignToNearestCluster
in class AbstractKMeans.Instance
protected Logging getLogger()
AbstractKMeans.Instance
getLogger
in class AbstractKMeans.Instance
Copyright © 2019 ELKI Development Team. License information.