Measures distance from data points to cluster centers
measure_dist(X, centers)
X | array Data points of dimension (n,d) |
---|---|
centers | array Coordinates of cluster centers, dimension (k,d) |
array Distance from each point to each center, dimension (n,k)
#> [,1] [,2] #> [1,] 0.1414214 1.5556349 #> [2,] 1.2727922 0.1414214