Skip to content

Modernize Kmeans including TypeScript wrappers#18

Open
Hugo-ter-Doest wants to merge 5 commits intomasterfrom
modernize-kmeans
Open

Modernize Kmeans including TypeScript wrappers#18
Hugo-ter-Doest wants to merge 5 commits intomasterfrom
modernize-kmeans

Conversation

@Hugo-ter-Doest
Copy link
Contributor

@Hugo-ter-Doest Hugo-ter-Doest commented Feb 23, 2026

This pull request introduces a modernized implementation of the KMeans clustering algorithm while preserving backwards compatibility with the original Apparatus API. The legacy implementation has been isolated, and a new, feature-rich KMeansModernized class has been added.

The original kmeans.js now acts as a wrapper, delegating to the modern implementation while maintaining the old API for existing consumers.

Furthermore, Sylvester is no longer used because direct vector manipulation performs better.

The original implementation is still part of the repo. A benchmark is included that shows the improved performance, both in memory usage and speed.

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