Package elki.clustering.kmeans
Class ExponionKMeans.Instance
- java.lang.Object
-
- elki.clustering.kmeans.AbstractKMeans.Instance
-
- elki.clustering.kmeans.HamerlyKMeans.Instance
-
- elki.clustering.kmeans.ExponionKMeans.Instance
-
- Direct Known Subclasses:
ShallotKMeans.Instance
- Enclosing class:
- ExponionKMeans<V extends NumberVector>
protected static class ExponionKMeans.Instance extends HamerlyKMeans.Instance
Inner instance, storing state for a single data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double[][]
cdist
Cluster center distances.(package private) int[][]
cnum
Sorted neighbors-
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
-
-
-
-
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 classHamerlyKMeans.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 classHamerlyKMeans.Instance
- Returns:
- number of objects reassigned
-
getLogger
protected Logging getLogger()
Description copied from class:AbstractKMeans.Instance
Get the class logger.- Overrides:
getLogger
in classHamerlyKMeans.Instance
- Returns:
- Logger
-
-