Package elki.clustering.kmeans.spherical
Class SphericalElkanKMeans.Instance
- java.lang.Object
-
- elki.clustering.kmeans.AbstractKMeans.Instance
-
- elki.clustering.kmeans.spherical.SphericalKMeans.Instance
-
- elki.clustering.kmeans.spherical.SphericalSimplifiedElkanKMeans.Instance
-
- elki.clustering.kmeans.spherical.SphericalElkanKMeans.Instance
-
- Enclosing class:
- SphericalElkanKMeans<V extends NumberVector>
protected static class SphericalElkanKMeans.Instance extends SphericalSimplifiedElkanKMeans.Instance
Inner instance, storing state for a single data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double[][]
ccsim
Cluster center similarities-
Fields inherited from class elki.clustering.kmeans.spherical.SphericalSimplifiedElkanKMeans.Instance
csim, lsim, newmeans, sums, usim
-
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, 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.protected void
recomputeSeperation(double[] csim, double[][] ccsim)
Recompute the separation of cluster means.-
Methods inherited from class elki.clustering.kmeans.spherical.SphericalSimplifiedElkanKMeans.Instance
iterate, updateBounds
-
Methods inherited from class elki.clustering.kmeans.spherical.SphericalKMeans.Instance
distance, distance, distance, initialSeparation, means, meansFromSums, movedSimilarity, recomputeVariance, similarity, similarity, sqrtdistance, sqrtdistance
-
Methods inherited from class elki.clustering.kmeans.AbstractKMeans.Instance
buildResult, buildResult, computeSquaredSeparation, copyMeans, initialSeperation, movedDistance, run, sqrtdistance
-
-
-
-
Constructor Detail
-
Instance
public Instance(Relation<? extends NumberVector> relation, double[][] means)
Constructor.- Parameters:
relation
- Relationmeans
- Initial means
-
-
Method Detail
-
initialAssignToNearestCluster
protected int initialAssignToNearestCluster()
Description copied from class:SphericalSimplifiedElkanKMeans.Instance
Perform initial cluster assignment.- Overrides:
initialAssignToNearestCluster
in classSphericalSimplifiedElkanKMeans.Instance
- Returns:
- Number of changes (i.e., relation size)
-
recomputeSeperation
protected void recomputeSeperation(double[] csim, double[][] ccsim)
Recompute the separation of cluster means.Used by Elkan's variant and Exponion.
- Overrides:
recomputeSeperation
in classAbstractKMeans.Instance
- Parameters:
csim
- Output array of similarityccsim
- Output square root of Center-to-Center similarities
-
assignToNearestCluster
protected int assignToNearestCluster()
Description copied from class:AbstractKMeans.Instance
Assign each object to the nearest cluster.- Overrides:
assignToNearestCluster
in classSphericalSimplifiedElkanKMeans.Instance
- Returns:
- number of objects reassigned
-
getLogger
protected Logging getLogger()
Description copied from class:AbstractKMeans.Instance
Get the class logger.- Overrides:
getLogger
in classSphericalSimplifiedElkanKMeans.Instance
- Returns:
- Logger
-
-