Format cluster models obtained for example by kmeans.

# S3 method for kmeans
model_parameters(model, verbose = TRUE, ...)

Arguments

model

Cluster model.

verbose

Toggle warnings and messages.

...

Arguments passed to or from other methods.

Examples

library(parameters)

model <- kmeans(iris[1:4], centers = 3)
model_parameters(model)
#> # K-means Cluster Means
#> 
#> The 3 clusters accounted for 79.05% of the total variance of the original data.
#> 
#> Cluster | n_Obs | Sum_Squares | Sepal.Length | Sepal.Width | Petal.Length | Petal.Width
#> ---------------------------------------------------------------------------------------
#> 1       |    21 |       17.67 |         4.74 |        2.90 |         1.79 |        0.35
#> 2       |    96 |      118.65 |         6.31 |        2.90 |         4.97 |        1.70
#> 3       |    33 |        6.43 |         5.18 |        3.62 |         1.47 |        0.27