ekaterinadimitrova2 commented on code in PR #2459: URL: https://github.com/apache/cassandra/pull/2459#discussion_r1258846311
########## doc/modules/cassandra/partials/vector_functions.adoc: ########## @@ -0,0 +1,41 @@ +[cols=",",options="header",] +|=== +|Function | Description + +| `similarity_cosine(vector, vector)` | Calculates the cosine similarity score between two float vectors of the same dimension. + +Examples: + +`similarity_cosine([0.1, 0.2], null)` -> `null` + +`similarity_cosine([0.1, 0.2], [0.1, 0.2])` -> `1` + +`similarity_cosine([0.1, 0.2], [-0.1, -0.2])` -> `0` + +`similarity_cosine([0.1, 0.2], [0.9, 0.8])` -> `0.964238` Review Comment: is this one correct? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

