Class SphericalAFKMC2.Instance
- java.lang.Object
-
- elki.clustering.kmeans.initialization.KMC2.Instance
-
- elki.clustering.kmeans.initialization.AFKMC2.Instance
-
- elki.clustering.kmeans.initialization.SphericalAFKMC2.Instance
-
- Enclosing class:
- SphericalAFKMC2
protected static class SphericalAFKMC2.Instance extends AFKMC2.Instance
Abstract instance implementing the weight handling.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description Instance(Relation<? extends NumberVector> relation, int m, double alpha, RandomFactory rnd)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
distance(DBIDRef cand, java.util.List<NumberVector> means)
Minimum distance to the current means.protected double
initialWeights(NumberVector first)
Initialize the weight list.protected double
similarity(NumberVector a, DBIDRef b)
Compute the distance of two objects.-
Methods inherited from class elki.clustering.kmeans.initialization.AFKMC2.Instance
getLogger, sample
-
Methods inherited from class elki.clustering.kmeans.initialization.KMC2.Instance
chooseRemaining, distance, run
-
-
-
-
Constructor Detail
-
Instance
public Instance(Relation<? extends NumberVector> relation, int m, double alpha, RandomFactory rnd)
Constructor.- Parameters:
relation
- Data relationalpha
- Alpha parameterm
- M parameterrnd
- Random generator
-
-
Method Detail
-
initialWeights
protected double initialWeights(NumberVector first)
Description copied from class:KMC2.Instance
Initialize the weight list.- Overrides:
initialWeights
in classKMC2.Instance
- Parameters:
first
- Added ID- Returns:
- Weight sum
-
similarity
protected double similarity(NumberVector a, DBIDRef b)
Compute the distance of two objects.- Parameters:
a
- First objectb
- Second object- Returns:
- Distance
-
distance
protected double distance(DBIDRef cand, java.util.List<NumberVector> means)
Description copied from class:KMC2.Instance
Minimum distance to the current means.- Overrides:
distance
in classKMC2.Instance
- Parameters:
cand
- Candidatemeans
- Current means- Returns:
- Minimum distance
-
-