Class SphericalKMeansPlusPlus<O>
- java.lang.Object
-
- elki.clustering.kmeans.initialization.AbstractKMeansInitialization
-
- elki.clustering.kmeans.initialization.SphericalKMeansPlusPlus<O>
-
- Type Parameters:
O
- Vector type
- All Implemented Interfaces:
KMeansInitialization
@Title("Spherical K-means++") @Reference(authors="Y. Endo and S. Miyamoto", title="Spherical k-Means++ Clustering", booktitle="Modeling Decisions for Artificial Intelligence", url="https://doi.org/10.1007/978-3-319-23240-9_9", bibkey="DBLP:conf/mdai/EndoM15") public class SphericalKMeansPlusPlus<O> extends AbstractKMeansInitialization
Spherical K-Means++ initialization for k-means.FIXME: currently assumes the vectors to be L2 normalized beforehand, but does not ensure that this is true.
Reference:
Y. Endo and S. Miyamoto
Spherical k-Means++ Clustering
Modeling Decisions for Artificial Intelligence- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SphericalKMeansPlusPlus.Instance
Abstract instance implementing the weight handling.static class
SphericalKMeansPlusPlus.Par<V>
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description protected double
alpha
Parameter to balance distance vs. uniform sampling.private static Logging
LOG
Class logger.-
Fields inherited from class elki.clustering.kmeans.initialization.AbstractKMeansInitialization
rnd
-
-
Constructor Summary
Constructors Constructor Description SphericalKMeansPlusPlus(double alpha, RandomFactory rnd)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
chooseInitialMeans(Relation<? extends NumberVector> relation, int k, NumberVectorDistance<?> distance)
Choose initial means-
Methods inherited from class elki.clustering.kmeans.initialization.AbstractKMeansInitialization
unboxVectors
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger.
-
alpha
protected double alpha
Parameter to balance distance vs. uniform sampling.
-
-
Constructor Detail
-
SphericalKMeansPlusPlus
public SphericalKMeansPlusPlus(double alpha, RandomFactory rnd)
Constructor.- Parameters:
alpha
- alpha-SKM parameter, usually 1.5rnd
- Random generator.
-
-
Method Detail
-
chooseInitialMeans
public double[][] chooseInitialMeans(Relation<? extends NumberVector> relation, int k, NumberVectorDistance<?> distance)
Description copied from interface:KMeansInitialization
Choose initial means- Parameters:
relation
- Relationk
- Parameter kdistance
- Distance function- Returns:
- List of chosen means for k-means
-
-