wrathematics / coop

Fast covariance, correlation, and cosine similarity.
Other
35 stars 6 forks source link

cosine similarity for vector and matrix #12

Open huashan opened 4 years ago

huashan commented 4 years ago

Thank you for this great package. It's super fast for computing cosine similarity for matrix pairwise. I'd like to ask if its possible to compute cosine similarity between a vector and each row/column of a matrix and keeping the efficiency? Yes, lapply() would do the work but way too slow comparing with proxy::simil()

michalovadek commented 2 years ago

same here, could also use a function like that if there are any efficiency gains to be had compared to looping/applying