protected static class KMediansLloyd.Instance extends AbstractKMeans.Instance
assignment, clusters, isSquared, k, key, means, relation, varsum
Constructor and Description |
---|
Instance(Relation<? extends NumberVector> relation,
NumberVectorDistanceFunction<?> df,
double[][] means)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Clustering<MeanModel> |
buildMediansResult() |
protected Logging |
getLogger()
Get the class logger.
|
protected int |
iterate(int iteration)
Main loop function.
|
protected double[][] |
medians(java.util.List<? extends DBIDs> clusters,
double[][] medians,
Relation<? extends NumberVector> relation)
Returns the median vectors of the given clusters in the given database.
|
assignToNearestCluster, buildResult, buildResult, copyMeans, distance, isSquared, meansFromSums, movedDistance, recomputeSeperation, run
public Instance(Relation<? extends NumberVector> relation, NumberVectorDistanceFunction<?> df, double[][] means)
relation
- Relationmeans
- Initial meansprotected int iterate(int iteration)
AbstractKMeans.Instance
iterate
in class AbstractKMeans.Instance
iteration
- Iteration number (beginning at 1)protected Clustering<MeanModel> buildMediansResult()
protected double[][] medians(java.util.List<? extends DBIDs> clusters, double[][] medians, Relation<? extends NumberVector> relation)
clusters
- the clusters to compute the meansmedians
- the recent mediansrelation
- the relation containing the vectorsprotected Logging getLogger()
AbstractKMeans.Instance
getLogger
in class AbstractKMeans.Instance
Copyright © 2019 ELKI Development Team. License information.