- All Implemented Interfaces:
- java.io.Serializable
public class KMeansAggregator
extends Object
implements scala.Serializable
KMeansAggregator computes the distances and updates the centers for blocks
in sparse or dense matrix in an online fashion.
param: centerMatrix The matrix containing center vectors.
param: k The number of clusters.
param: numFeatures The number of features.
param: distanceMeasure The distance measure.
When 'euclidean' is chosen, the instance blocks should contains
the squared norms in the labels field;
When 'cosine' is chosen, the vectors should be already normalized.
- See Also:
- Serialized Form