cluster_cost

Function cluster_cost 

Source
pub fn cluster_cost(
    res: &Resources,
    x: &ManagedTensor,
    centroids: &ManagedTensor,
) -> Result<f64>
Expand description

Compute cluster cost given an input matrix and existing centroids

ยงArguments

  • res - Resources to use
  • x - Input matrix in device memory - shape (m, k)
  • centroids - Centroids calculated by fit in device memory, shape (n_clusters, k)