Package Exports
- ml-distance-euclidean
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-distance-euclidean) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.