Description Usage Arguments Value Examples
View source: R/show_clusters.R
This function reduces a data set to 2 dimensions using principle component analysis (PCA) and colours clusters of points.
1 | show_clusters(X, clusters, centroids)
|
X |
array Data points of dimension (n,d) |
clusters |
array Cluster assignments for each point in X, dimension (n,1) |
centroids |
array Coordinates of cluster centers, dimension (k,d) |
plot A 2d principle components scatter plot coloured by cluster
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.