JSPM

ml-distance-euclidean

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 301321
  • Score
    100M100P100Q206433F
  • License MIT

Compute the euclidean distance between two vectors

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

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