mirror of https://github.com/vladmandic/human
updated docs
parent
cef8c9cc9f
commit
ac5d01255f
|
@ -59,16 +59,17 @@ Embedding vectors are calulated feature vector values uniquely identifying a giv
|
||||||
|
|
||||||
They can be stored as normal arrays and reused as needed
|
They can be stored as normal arrays and reused as needed
|
||||||
|
|
||||||
Simmilarity function is based on *Eucilidean distance* between all points in vector
|
Simmilarity function is based on general *Minkowski distance* between all points in vector
|
||||||
*Eucliean distance is limited case of Minkowski distance with order of 2*
|
|
||||||
*[Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) is a nth root of sum of nth powers of distances between each point (each value in 192-member array)*
|
*[Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) is a nth root of sum of nth powers of distances between each point (each value in 192-member array)*
|
||||||
|
|
||||||
|
*Default is Eucliean distance which is a limited case of Minkowski distance with order of 2*
|
||||||
|
|
||||||
Changing `order` can make simmilarity matching more or less sensitive (default order is 2nd order)
|
Changing `order` can make simmilarity matching more or less sensitive (default order is 2nd order)
|
||||||
For example, those will produce slighly different results:
|
For example, those will produce slighly different results:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const simmilarity2ndOrder = human.simmilarity(firstEmbedding, secondEmbedding, 2);
|
const simmilarity2ndOrder = human.simmilarity(firstEmbedding, secondEmbedding, 2);
|
||||||
const simmilarity3rdOrder = human.simmilarity(firstEmbedding, secondEmbedding, 2);
|
const simmilarity3rdOrder = human.simmilarity(firstEmbedding, secondEmbedding, 3);
|
||||||
```
|
```
|
||||||
|
|
||||||
How simmilarity is calculated:
|
How simmilarity is calculated:
|
||||||
|
|
Loading…
Reference in New Issue