kmeans-clust
k-means clustering in TypeScript
Installation
Library can be installed via npm.
$ npm install kmeans-clust
Example
;;kmeanspoints, 2 //=> [ { centroid: [ 0.5 ], points: [ [Array], [Array] ], error: 1 }, //=> { centroid: [ 9.5 ], points: [ [Array], [Array] ], error: 1 } ]
To run graphic example execute command
$ npm run example
Live example is available https://mleko.gitlab.io/kmeans-clust/