Given vector A and vector B, which would be the better approach for getting top k embedding vectors such that they are similar to embedding vector A and dissimilar to vector B. Approach 1: calculate f(V) = cosine_similarity(A,V) - cosine_similarity(B,V) for each vector V sort vectors by f(V) value in descending order take first k of them. Approach 2: calculate f(V) = cosine_similarity(A,V) , g(V) = cosine_similarity(B,V) for each vector V sort...
Originally asked by Shubham on Stack Exchange (ai) (CC BY-SA 4.0).
Variant 65.