Package elki.clustering.kmeans
Class ShallotKMeans.Instance
- java.lang.Object
-
- elki.clustering.kmeans.AbstractKMeans.Instance
-
- elki.clustering.kmeans.HamerlyKMeans.Instance
-
- elki.clustering.kmeans.ExponionKMeans.Instance
-
- elki.clustering.kmeans.ShallotKMeans.Instance
-
- Enclosing class:
- ShallotKMeans<V extends NumberVector>
protected static class ShallotKMeans.Instance extends ExponionKMeans.Instance
Inner instance, storing state for a single data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) WritableIntegerDataStore
second
Second nearest cluster.-
Fields inherited from class elki.clustering.kmeans.ExponionKMeans.Instance
cdist, cnum
-
Fields inherited from class elki.clustering.kmeans.HamerlyKMeans.Instance
lower, newmeans, sep, sums, upper
-
Fields inherited from class elki.clustering.kmeans.AbstractKMeans.Instance
assignment, clusters, diststat, isSquared, k, key, means, relation, varsum
-
-
Constructor Summary
Constructors Constructor Description Instance(Relation<? extends NumberVector> relation, NumberVectorDistance<?> df, double[][] means)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
assignToNearestCluster()
Assign each object to the nearest cluster.protected Logging
getLogger()
Get the class logger.protected int
initialAssignToNearestCluster()
Perform initial cluster assignment.-
Methods inherited from class elki.clustering.kmeans.HamerlyKMeans.Instance
iterate, recomputeSeperation, updateBounds
-
Methods inherited from class elki.clustering.kmeans.AbstractKMeans.Instance
buildResult, buildResult, computeSquaredSeparation, copyMeans, distance, distance, distance, initialSeperation, meansFromSums, movedDistance, recomputeSeperation, recomputeVariance, run, sqrtdistance, sqrtdistance, sqrtdistance
-
-
-
-
Field Detail
-
second
WritableIntegerDataStore second
Second nearest cluster.
-
-
Constructor Detail
-
Instance
public Instance(Relation<? extends NumberVector> relation, NumberVectorDistance<?> df, double[][] means)
Constructor.- Parameters:
relation
- Data relationdf
- Distance functionmeans
- Initial means
-
-
Method Detail
-
initialAssignToNearestCluster
protected int initialAssignToNearestCluster()
Description copied from class:HamerlyKMeans.Instance
Perform initial cluster assignment.- Overrides:
initialAssignToNearestCluster
in classExponionKMeans.Instance
- Returns:
- Number of changes (i.e., relation size)
-
assignToNearestCluster
protected int assignToNearestCluster()
Description copied from class:AbstractKMeans.Instance
Assign each object to the nearest cluster.- Overrides:
assignToNearestCluster
in classExponionKMeans.Instance
- Returns:
- number of objects reassigned
-
getLogger
protected Logging getLogger()
Description copied from class:AbstractKMeans.Instance
Get the class logger.- Overrides:
getLogger
in classExponionKMeans.Instance
- Returns:
- Logger
-
-