COSINE
Cosine similarity. NOTE: the preferred way to perform cosine similarity is to normalize all vectors to unit length, and instead use VectorSimilarityFunction.DOT_PRODUCT. You should only use this function if you need to preserve the original vectors and cannot normalize them in advance. The similarity score is normalised to assure it is positive.
Properties
Functions
Link copied to clipboard
Calculates a similarity score between the two vectors with a specified function. Higher similarity scores correspond to closer vectors. Each (signed) byte represents a vector dimension.
Calculates a similarity score between the two vectors with a specified function. Higher similarity scores correspond to closer vectors.