Skip to content

Commit

Permalink
fix cosine_distance docs (oceanbase#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
nautaa authored Oct 18, 2024
1 parent 6f7d740 commit f06b11a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/game/miniob-vectordb.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ select embedding + '[1.5,2.3,3.3]', embedding - '[1,2,3]', '[1,2,3]' - embedding

* cosine_distance:
* 语法:cosine_distance(vector A, vector B)
* 计算公式:$[ D = \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} = \frac{\sum_{i=1}^{n} A_i B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}} ]$
* 计算公式:$[ D = 1 - \frac{\mathbf{A} \cdot \mathbf{B}}{|\mathbf{A}| |\mathbf{B}|} = 1 - \frac{\sum_{i=1}^{n} A_i B_i}{\sqrt{\sum_{i=1}^{n} A_i^2} \sqrt{\sum_{i=1}^{n} B_i^2}} ]$

* inner_product:
* 语法:inner_product(vector A, vector B)
Expand Down

0 comments on commit f06b11a

Please sign in to comment.