cr.sparse.cluster.vq.find_assignment

cr.sparse.cluster.vq.find_assignment(points, centroids)[source]

Finds the assignment of each point to a specific centroid

Parameters
  • points (jax.numpy.ndarray) – Each row of the points matrix is a point.

  • centroids (jax.numpy.ndarray) – An array of centroids

Returns

A tuple consisting of

  1. An assignment array of each point to a cluster

  2. Distance of each point from corresponding cluster centroid

Return type

(jax.numpy.ndarray, jax.numpy.ndarray)