I have n vectors, each with m elements (real number). I want to find the pair where there cosine similarity is maximum among all pairs.
The straightforward solution would require O(n2m) time.
Is there any better solution?
update
Cosine similarity / distance and triangle equation Inspires me that I could replace "cosine similarity" with "chord length" which loses precision but increases speed a lot. ( there are many existing solutions solving Nearest Neighbor in metric space, like ANN )