Skip to content

[Perf #478] KMeans Digits fit: eliminate 5.9x training deficit while preserving clustering equivalence #485

Description

@godofecht

Parent: #478

Canonical v2 Digits: Flow fit 351.94 ms vs sklearn 59.75 ms while Flow predict is faster (0.082 ms vs 0.132 ms). End-to-end is ~0.170x. Iris KMeans already wins ~6.7x, so the hole is scale-sensitive fit behavior.

Profile initialization, distance matrix/assignment, centroid accumulation, empty-cluster handling, convergence checks, restarts, allocation/copies and iteration count. Record distance evaluations and iterations so algorithmic work is separated from kernel throughput. Preserve the existing ARI/inertia semantic contract.

Acceptance: stage/iteration profile, operation counts, scaled samples/features/clusters/restarts, no regression in inertia/ARI parity, Digits fit >=0.95x first and >=1.05x target, current prediction win retained.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions