4 ms·
Because you use numpy. Could as well import cosine_similarity from sklearn.
by forgotpwd16 2y ago
Because you use numpy. Could as well import cosine_similarity from sklearn.
- Etherlord87 2y agoyou could also normalize (divide all components by magnitude) both vectors and simply take the dot product?