Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.

Commit afa0952

Browse files
committed
Ported metrics table
1 parent b23273b commit afa0952

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/usage-guide.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,13 @@ let collection = client.createCollection({
303303
304304
</Tabs>
305305
306-
Valid options for `hnsw:space` are "l2", "ip, "or "cosine". The **default** is "l2". The equations for each can be found in the docs for Hnswlib [here](https://github.com/nmslib/hnswlib/tree/master#python-bindings).
306+
Valid options for `hnsw:space` are "l2", "ip, "or "cosine". The **default** is "l2" which is the squared L2 norm.
307+
308+
| Distance | parameter | Equation |
309+
| ----------------- | :-------: | -------------------------------------------------------: |
310+
| Squared L2 | 'l2' | d = sum((Ai-Bi)^2) |
311+
| Inner product | 'ip' | d = 1.0 - sum(Ai\*Bi) |
312+
| Cosine similarity | 'cosine' | d = 1.0 - sum(Ai\*Bi) / sqrt(sum(Ai\*Ai) \* sum(Bi\*Bi)) |
307313
308314
### Adding data to a Collection
309315

0 commit comments

Comments
 (0)