protected static class KMeansSimplifiedElkan.Instance extends AbstractKMeans.Instance
Modifier and Type | Field and Description |
---|---|
(package private) WritableDataStore<double[]> |
lower
Lower bounds
|
(package private) double[][] |
newmeans
Scratch space for new means.
|
(package private) double[] |
sep
Cluster separation
|
(package private) double[][] |
sums
Sums of clusters.
|
(package private) WritableDoubleDataStore |
upper
Upper bounds
|
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()
Reassign objects, but avoid unnecessary computations based on their
bounds.
|
protected Logging |
getLogger()
Get the class logger.
|
protected int |
initialAssignToNearestCluster()
Perform initial cluster assignment.
|
protected int |
iterate(int iteration)
Main loop function.
|
protected void |
updateBounds(double[] move)
Update the bounds for k-means.
|
buildResult, buildResult, copyMeans, distance, isSquared, meansFromSums, movedDistance, recomputeSeperation, run
WritableDoubleDataStore upper
WritableDataStore<double[]> lower
double[][] sums
double[][] newmeans
double[] sep
public Instance(Relation<? extends NumberVector> relation, NumberVectorDistanceFunction<?> df, double[][] means)
relation
- Relationmeans
- Initial meansprotected int iterate(int iteration)
AbstractKMeans.Instance
iterate
in class AbstractKMeans.Instance
iteration
- Iteration number (beginning at 1)protected int initialAssignToNearestCluster()
protected int assignToNearestCluster()
assignToNearestCluster
in class AbstractKMeans.Instance
protected void updateBounds(double[] move)
move
- Movement of centersprotected Logging getLogger()
AbstractKMeans.Instance
getLogger
in class AbstractKMeans.Instance
Copyright © 2019 ELKI Development Team. License information.