ml-distance-euclidean
v2.0.0
Published
Compute the euclidean distance between two vectors
Downloads
1,396,630
Readme
ml-distance-euclidean
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.