mljs / kmeans Goto Github PK
View Code? Open in Web Editor NEWK-Means clustering
License: MIT License
K-Means clustering
License: MIT License
I tried to use ml-kmeans in a TypeScript project, but it appears that kmeans I import is not a function, generating .d.ts file may help.
Error message that states, "K should be a positive integer bigger than the number of points" should say "smaller", rather than "bigger". Line 76 src/kmeans.js
Happy to fix this and submit a pull request, if preferred. Didn't think an error message typo may be worthy of a PR. :-)
function kmeans(data, k, options)
options.initialisation
Hi,
I'm using Rollup to build an es6 module and when I go to build my files, I get the following error:
[!] Error: 'squared' is not exported by node_modules/ml-kmeans/node_modules/ml-distance-euclidean/euclidean.js
npm ERR! code ELIFECYCLEp/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
npm ERR! errno 1kmeans/src/initialization.js (2:9)
I realize this could probably be handled using rollup-plugin-commonjs, but it looks like the issue has already been partially addressed in version 4.1.
Your distance-euclidean
repo builds a directory lib-es6
but this is not present in node_modules/ml-kmeans/node_modules/ml-distance-euclidean/
so it ends up using the default commonjs version.
Am I missing something here? Has ml-kmeans
been tested with an es6 build?
Thanks,
Josh
First of all, thanks for the amazing library.
wcss
to the KMeansResult?Thanks again!
In the userguide it seems it works on with x,y points. Is this correct ?
I would like to kluster r,g,b points.
I'd like to refactor the library to a class, with an API similar to sklearn: http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html
I'll migrate to TypeScript at the same time.
@mljs/collaborators WDYT?
Sometimes KMeansResult's centroids value is NaN for both x,y (Two-dimensional array) and for this centroid error value is NaN.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.