View source: R/extract_characterization.R
extract_centroids | R Documentation |
Extract clusters from model
extract_centroids(object, ...)
object |
An cluster_spec object. |
... |
Other arguments passed to methods. |
A tibble::tibble()
with 1 row for each centroid and their position.
set.seed(1234) kmeans_spec <- k_means(num_clusters = 5) %>% set_engine("stats") kmeans_fit <- fit(kmeans_spec, ~., mtcars) kmeans_fit %>% extract_centroids()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.