From f06b11a5ee7c284594a4617fc09831a0bf4506aa Mon Sep 17 00:00:00 2001 From: nauta <870284156@qq.com> Date: Fri, 18 Oct 2024 16:47:55 +0800 Subject: [PATCH] fix cosine_distance docs (#464) --- docs/docs/game/miniob-vectordb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/game/miniob-vectordb.md b/docs/docs/game/miniob-vectordb.md index 52c93e3c2..3e6ae2de9 100644 --- a/docs/docs/game/miniob-vectordb.md +++ b/docs/docs/game/miniob-vectordb.md @@ -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)