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

data-clustering

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-clustering - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json

@@ -8,3 +8,3 @@ {

},
"version": "0.1.2",
"version": "0.1.3",
"scripts": {

@@ -11,0 +11,0 @@ "webpack": "webpack"

@@ -135,2 +135,3 @@ import {mean, std, corr, dotp, L2_norm} from './statistic';

export function correlation_similarity(a, b){
if(a.length <= 1) return 0;
var ma = mean(a);

@@ -153,3 +154,3 @@ var mb = mean(b);

});
return dotp(ak, bk);
return dotp(ak, bk) / (a.length - 1);
}

@@ -156,0 +157,0 @@

@@ -74,2 +74,3 @@ import {isArray} from './utils.js';

else{
if(v.length <= 1) return 0;
m = mean(v);

@@ -80,3 +81,3 @@ sum = 0;

}
return sum / v.length;
return sum / (v.length - 1);
}

@@ -83,0 +84,0 @@ }

Sorry, the diff of this file is too big to display

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