Assigns data points to k clusters
assign(X, centers)
Arguments
X |
array Data points of dimension (n,d) |
centers |
array Coordinates of cluster centers, dimension (k,d) |
Value
array Cluster assignments for each point in X, dimension (n,1)
Examples
#> [,1]
#> [1,] 1
#> [2,] 2