From dc58b8b2a0bacc4532baf8ee6c885c935c4f222d Mon Sep 17 00:00:00 2001 From: Mario Martin Plaza Date: Thu, 8 Feb 2024 00:50:08 +0100 Subject: [PATCH] Add Cosine SimilarityMetricType --- Milvus.Client/SimilarityMetricType.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Milvus.Client/SimilarityMetricType.cs b/Milvus.Client/SimilarityMetricType.cs index 88d6608..19e3019 100644 --- a/Milvus.Client/SimilarityMetricType.cs +++ b/Milvus.Client/SimilarityMetricType.cs @@ -125,4 +125,29 @@ public enum SimilarityMetricType /// For more details, see . /// Substructure, + + /// + /// is used to measure the cosine of the angle between two non-zero vectors in a multidimensional space, + /// reflecting the degree of similarity between them. The value ranges from -1 to 1, where 1 indicates that the vectors + /// are identical. + /// + /// + /// + /// This metric is particularly useful for measuring the similarity in text analysis and other types of data where + /// the magnitude of the vectors does not matter as much as the direction. In these cases, cosine similarity can + /// effectively capture the similarity between vectors, regardless of their size. + /// + /// + /// It's widely used in applications involving natural language processing, search engines, and recommendation systems + /// to calculate the similarity between documents or user preferences. + /// + /// + /// This metric type is valid for float vectors only. + /// + /// + /// For more details, see . + /// + /// + Cosine, + }