Summary of an emeans fit for tidyclust
Source:R/integration-tidyclust.R
extract_fit_summary.emeans.RdMethod for tidyclust::extract_fit_summary().
Usage
# S3 method for class 'emeans'
extract_fit_summary(object, ..., prefix = "Cluster_", labels = NULL)Value
A list with cluster_names, centroids, n_members,
sse_within_total_total, sse_total, orig_labels and
cluster_assignments.
Examples
set.seed(1)
fit <- emeans(matrix(rnorm(200), ncol = 2), 2, threads = 1)
str(tidyclust::extract_fit_summary(fit))
#> List of 7
#> $ cluster_names : Factor w/ 2 levels "Cluster_1","Cluster_2": 1 2
#> $ centroids :'data.frame': 2 obs. of 2 variables:
#> ..$ V1: num [1:2] -0.072 0.417
#> ..$ V2: num [1:2] -0.619 0.953
#> $ n_members : int [1:2] 64 36
#> $ sse_within_total_total: num [1:2] 71 36.4
#> $ sse_total : num 171
#> $ orig_labels : int [1:100] 1 1 1 2 1 2 2 2 2 2 ...
#> $ cluster_assignments : Factor w/ 2 levels "Cluster_1","Cluster_2": 1 1 1 2 1 2 2 2 2 2 ...