kmeans — screenshot of github.com

kmeans

This is a Go implementation of the k-means clustering algorithm. I use it for partitioning multi-dimensional numeric data into a specified number of clusters.

Visit github.com →

Questions & Answers

What is muesli/kmeans?
muesli/kmeans is a Go implementation of the k-means clustering algorithm. It partitions multi-dimensional datasets into a specified number of clusters, where each data point belongs to the cluster with the nearest mean.
Who should use muesli/kmeans?
This library is suitable for developers and data scientists working with Go who need to apply unsupervised learning to numeric, multi-dimensional datasets without existing labels, and who know the desired number of clusters.
When is k-means clustering, as implemented by muesli/kmeans, appropriate?
Use muesli/kmeans when you have numeric, multi-dimensional data without labels and you know the exact number of clusters (k) you want to partition your data into. It's a method for finding natural groupings within your data.
What are some notable features or options in muesli/kmeans?
muesli/kmeans allows users to adjust the delta threshold to optimize performance, completing the algorithm when a specified percentage of data points no longer shift cluster assignments. It also includes an optional plotter for visualizing 2D data clustering iterations.
What is the computational complexity of the k-means algorithm in muesli/kmeans?
The running time is generally O(nkdi), where n is data points, k is clusters, d is dimensions, and i is iterations until convergence. While worst-case is superpolynomial, it's often considered "linear" in practice due to a small number of iterations.