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 88.43% of the total variance of the original data.
#> 
#> Cluster | n_Obs | Sum_Squares | Sepal.Length | Sepal.Width | Petal.Length | Petal.Width
#> ---------------------------------------------------------------------------------------
#> 1       |    38 |       23.88 |         6.85 |        3.07 |         5.74 |        2.07
#> 2       |    62 |       39.82 |         5.90 |        2.75 |         4.39 |        1.43
#> 3       |    50 |       15.15 |         5.01 |        3.43 |         1.46 |        0.25