Skip to content

Commit e2ca570

Browse files
authored
Change cosine similarity to distance in README
Issues #532 and #456
1 parent 0d9f192 commit e2ca570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Description of the algorithm parameters can be found in [ALGO_PARAMS.md](ALGO_PA
4141
| ------------- |:---------------:| -----------------------:|
4242
|Squared L2 |'l2' | d = sum((Ai-Bi)^2) |
4343
|Inner product |'ip' | d = 1.0 - sum(Ai\*Bi) |
44-
|Cosine similarity |'cosine' | d = 1.0 - sum(Ai\*Bi) / sqrt(sum(Ai\*Ai) * sum(Bi\*Bi))|
44+
|Cosine distance |'cosine' | d = 1.0 - sum(Ai\*Bi) / sqrt(sum(Ai\*Ai) * sum(Bi\*Bi))|
4545

4646
Note that inner product is not an actual metric. An element can be closer to some other element than to itself. That allows some speedup if you remove all elements that are not the closest to themselves from the index.
4747

0 commit comments

Comments
 (0)