K-Means
TanayLabUtilities.KMeans
—
Module
Higher-level K-Means functions.
TanayLabUtilities.KMeans.kmeans_in_rounds
—
Function
kmeans_in_rounds(
values_of_points::AbstractMatrix{<:AbstractFloat},
k::Integer;
centers::Maybe{AbstractMatrix{<:AbstractFloat}} = ```nothing```,
rounds::Integer = ```10```,
rng::AbstractRNG = default_rng(),
)::KmeansResult
Run
kmeans
multiple times with different random seeds (using
rng
) and return the best results. This is needed because K-Means is a heuristic and tends to occasionally get stuck in a local minimum.