Wraps stats::kmeans with Hartigan-Wong (the default).
Examples
morie_kmeans_clustering(x = rnorm(50))
#> $estimate
#> [1] 10.6396
#>
#> $labels
#> [1] 0 1 1 0 2 1 0 0 0 0 0 0 0 2 1 1 0 2 0 0 2 0 0 0 2 1 0 2 0 0 2 2 0 0 0 0 0 2
#> [39] 1 0 0 1 0 2 1 2 0 0 0 1
#>
#> $centers
#> [,1]
#> 1 0.04759894
#> 2 1.43981618
#> 3 -1.57673781
#>
#> $inertia
#> [1] 10.6396
#>
#> $n_iter
#> [1] 2
#>
#> $n_clusters
#> [1] 3
#>
#> $n
#> [1] 50
#>
#> $method
#> [1] "K-means (Hartigan-Wong)"
#>
