Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

skmeans

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skmeans - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

8

main.js
/*jshint esversion: 6 */
const MAX = 10000;
const abs = Math.abs;
const sqrt = Math.sqrt;

@@ -16,3 +18,3 @@ /**

}
return Math.sqrt(sum);
return sqrt(sum);
}

@@ -28,3 +30,3 @@

for(let i=0;i<len;i++) {
sum += Math.abs((v1[i]||0) - (v2[i]||0));
sum += abs((v1[i]||0) - (v2[i]||0));
}

@@ -65,3 +67,3 @@ return sum;

// Multidimensional or unidimensional
var dist = multi? eudist(data[i],ks[j]) : Math.abs(data[i]-ks[j]);
var dist = multi? eudist(data[i],ks[j]) : abs(data[i]-ks[j]);
if(dist<min) {

@@ -68,0 +70,0 @@ min = dist;

{
"name": "skmeans",
"version": "0.5.0",
"version": "0.5.1",
"description": "Super fast simple kmeans clustering for unidimiensional data",

@@ -5,0 +5,0 @@ "author": "David Gómez Matarrodona <solzimer@gmail.com>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc