Description Usage Arguments Value Examples
For each observation the euclidean distance to each of the cluster centres is calculated and cluster with the smallest distance is return for that observation.
1 | nearest_cluster(data, centres)
|
data |
a matrix (n x m) to be clustered |
centres |
matrix of cluster means (k x m), wher k is the number of clusters. |
vector of cluster allocations, n values ranging from 1 to k.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.