Nearest Phase Modulator

    @ridwan-p/kmeans
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    K-Means

    Latest Release npm version

    K-Means clustering algorithm implementation written in javascript

    npm i @ridwan-p/kmeans
    const data = [
        [6, 2.92], [6.7, 3.07], [7.4, 3.22],
        [6.7, 2.93], [9.2, 3.03], [7.4, 3.29],
        [9.3, 3.28], [4.5, 2.72], [6.4, 2.92],
        [8.5, 3.49], [6.9, 3.08], [5.8, 2.83],
        [6.3, 3.18], [6.4, 3.2], [3.9, 3.29],
      ];
      
    const kmeans = new Kmeans(data, 3)
    // calculate
    kmeans.run()
      .then( res => { console.log('result', res) } )

    Install

    npm i @ridwan-p/kmeans

    DownloadsWeekly Downloads

    1

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    5.91 kB

    Total Files

    7

    Last publish

    Collaborators

    • ridwan-p