Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosine distance #71

Closed
mlesnoff opened this issue Mar 15, 2024 · 1 comment
Closed

Cosine distance #71

mlesnoff opened this issue Mar 15, 2024 · 1 comment

Comments

@mlesnoff
Copy link

mlesnoff commented Mar 15, 2024

Is there not a typing error here?

"""Cosine distance"""
cosine_distance(x,y) = dot(x,y)/(norm(x)*norm(y))
"""

"""Cosine distance"""
cosine_distance(x,y) = dot(x,y)/(norm(x)*norm(y))
"""

I guess it should be:

"""Cosine distance"""
cosine_distance(x,y) = 1 - dot(x,y)/(norm(x)*norm(y))
"""

(if I well understood what you wanted to refer to as "cosine distance")

@sylvaticus
Copy link
Owner

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants