Skip to content

Add e-means algorithm, standalone emeans package, tests and CI - #22

Merged
cmtt merged 4 commits into
masterfrom
emeans
Nov 11, 2026
Merged

cmtt merged 4 commits into
masterfrom
emeans

Conversation

@cmtt

@cmtt cmtt commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Opt-in algorithm: 'emeans' (mini-batch e-means, https://e-means.github.io/, arXiv:2611.09501); Lloyd stays the default.
  • New standalone emeans package (packages/emeans, published as 0.1.0; 0.1.1 here adds ESM entry, exports map, README).
  • Fixes: iterations reported maxIterations + 1 when capped; default assignments array had length k instead of n.
  • Tests: 100% line coverage via c8; bench/run.js benchmark.
  • GitHub Actions: CI (lint, coverage, bench smoke, pack dry-run), Pages deploy from docs/, tag-triggered npm release via OIDC trusted publishing. Travis removed.

Notes

  • Benchmark claims are on synthetic data against a capped (25 iteration) single-threaded JS Lloyd; scaling-law constants come from the Faiss reference, which says they differ from the paper's Table 2.
  • kmpp 0.2.0 depends on emeans; do not publish it until emeans@0.1.1 is released.

Matthias Thömmes added 4 commits November 11, 2026 10:28
Port of the CPU path of faiss/contrib/e_means (arXiv:2611.09501) behind
algorithm: 'emeans'. Lloyd remains the default. Adds tests and bench/run.js.
- packages/emeans: zero-dependency npm package (v0.1.0) with types, tests, license
- kmpp 0.2.0 depends on emeans for algorithm: 'emeans'
- fix iterations off-by-one and default assignments length
- tests: 100% line coverage via c8; GitHub Actions replaces Travis
- emeans 0.1.1: ESM entry, exports map, richer README with benchmark and attribution
- GitHub Actions: Pages deploy from docs/, tag-triggered npm release via OIDC trusted publishing with provenance
- CI: npm pack dry-run
@cmtt
cmtt merged commit ec4a5d2 into master Nov 11, 2026
4 checks passed
@cmtt
cmtt deleted the emeans branch November 11, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant