Package Exports
- ml-distance-matrix
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-matrix) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
distance-matrix
Compute a distance/similarity matrix.
Installation
npm i ml-distance-matrix
API Documentation
Example
const distanceMatrix = require('ml-distance-matrix');
const { euclidean } = require('ml-distance-euclidean');
// Computes euclidan distance for each pair of possible vectors
const matrix = distanceMatrix([[8, -1, 2], [-4, 0, 3], [-3, -1, 6]], euclidean);