Skip to main content

logos_kmeans_program

Function logos_kmeans_program 

Source
pub fn logos_kmeans_program(
    n: usize,
    k: usize,
    f: usize,
    iters: usize,
) -> String
Expand description

K-means clustering in LOGOS — Lloyd’s algorithm as Spatial’s Kmeans app runs it: n points of f features (row-major, filled q % 97 over the flat index), k centroids starting as the first k points, iters epochs each assigning every point to its nearest centroid by the squared distance (the last of equally near ones, as the app’s accelerator), summing and counting each centroid’s points, and setting every centroid to the integer mean of its points (0 for one with none). It shows Σ (t + 1)·centroids[t], a checksum a permuted or partial result does not reproduce.