ml-distance-matrix
v2.0.1
Published
Compute a distance/similarity matrix
Downloads
9,697
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);