Coder Social home page Coder Social logo

kmeans's People

Contributors

automata avatar escapedgibbon avatar lpatiny avatar maasencioh avatar mljs-bot avatar stropitek avatar targos avatar wadjih-bencheikh18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kmeans's Issues

error message incorrect

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. :-)

Change the parameters ?

function kmeans(data, k, options)

options.initialisation

  • array of your current centers
  • 'random' (default value) : we take randomly k points of the data

Compatibility with rollup and es6

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

does it works in n D

In the userguide it seems it works on with x,y points. Is this correct ?

I would like to kluster r,g,b points.

Centroid value is NaN

Sometimes KMeansResult's centroids value is NaN for both x,y (Two-dimensional array) and for this centroid error value is NaN.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.