cr.sparse.cluster.vq.KMeansState¶
- class cr.sparse.cluster.vq.KMeansState(centroids: jax.Array, assignment: jax.Array, distortion: float, prev_distortion: float, iterations: int)[source]¶
The state for K-means algorithm
Attributes
assignmentCurrent assignment of points to centroids
centroidsCurrent set of centroids
distortionCurrent mean distance
iterationsThe number of iterations it took to complete
prev_distortionPrevious mean distance