Description Usage Arguments Value Examples
Plot data according to cluster assigments
1 | kmeans_report(clustered_data)
|
clustered_data |
– the data object (data frame or matrix) that k-means clustering has been applied to |
plot – a scatter plot of the data coloured by cluster assignment (if 2D data) – a data frame reporting points and their cluster assignemnts
1 2 3 4 5 6 7 | x <- runif(100, min = 0, max = 10) + rep(c(0, 10), 50)
y <- rnorm(100, 5, 1) + rep(c(0, 10), 50)
data = data.frame(x = x, y = y)
centers <- kmeans_init(data = data, K = 2)
clustered_data <- kmeans_cluster(data=data, centers=centers)
kmeans_report(clustered_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.