-
Notifications
You must be signed in to change notification settings - Fork 420
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
PhotoSearchModel.swift: "cosine_similarity" function #26
Comments
Thank you for the correction, I indeed should not have divided by 1/n when calculating the sum, you are right. Can you submit a PR (Pull Request)? |
Yes, submitted a pull request, though I never did it before. Hoping I did it correctly. |
mazzzystar
added a commit
that referenced
this issue
Nov 13, 2023
@HKdAlex Merged, your implementation is correct, thank you for pointing it out ! |
mazzzystar
added a commit
that referenced
this issue
Jan 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this function actually correct?
This line does not seem to be calculating the magnitude of a vector which is supposed to the square root of the sum of squares (RSS) but is actually calculating the RMS (the square root of the mean sum of squares):
My suggested correction would be:
I am not good at this stuff but trying t figure it out.
The text was updated successfully, but these errors were encountered: