🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

ml-distance-euclidean

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-distance-euclidean

Compute the euclidean distance between two vectors

2.0.0
latest
Version published
Weekly downloads
275K
29.97%
Maintainers
5
Weekly downloads
 
Created

ml-distance-euclidean

NPM version build status npm download

Compute the euclidean distance between two vectors

Installation

$ npm install ml-distance-euclidean

API

const { euclidean, squaredEuclidean } = require('ml-distance-euclidean');

euclidean([0, 1, 4, 6, 2], [3, 6, 9, 4, 3]); // 8

euclidean(p, q)

Returns the Euclidean distance between vectors p and q.

squaredEuclidean(p, q)

Returns the squared Euclidean distance between vectors p and q.

License

MIT

FAQs

Package last updated on 12 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts