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

About the distance metric #17

Closed
XiaLiPKU opened this issue Sep 24, 2020 · 6 comments
Closed

About the distance metric #17

XiaLiPKU opened this issue Sep 24, 2020 · 6 comments

Comments

@XiaLiPKU
Copy link

d = xs + ys - 2. * torch.matmul(x, torch.t(y))

The distance metric is simply the l2-distance, as shown above.
However, in your paper, the distance is defined as Eq.1.
So, which one is better?

@z-x-yang
Copy link
Owner

z-x-yang commented Sep 24, 2020

This is just the same distance in our paper.

||x-y||^2=sum(x^2)-2*sum(xy)+sum(y^2)

The latter format is more computationally efficient.

@XiaLiPKU
Copy link
Author

This is just the same distance in our paper.

||x-y||^2=sum(x^2)-2*sum(xy)+sum(y^2)

The latter format is more computationally efficient.

But in the paper, the equation is 1 - 2 / (1 + exp(||x -y||^2 + bias)

@XiaLiPKU
Copy link
Author

But in the paper, the equation is 1 - 2 / (1 + exp(||x -y||^2 + bias)
This difference doesn't influence the minimum indexes but influences the minimum values

@z-x-yang
Copy link
Owner

z-x-yang commented Sep 25, 2020

1 - 2 / (1 + exp(||x -y||^2 + bias).

See here.

@XiaLiPKU
Copy link
Author

1 - 2 / (1 + exp(||x -y||^2 + bias).

See here.

Got it, Thank you very much!

@z-x-yang
Copy link
Owner

Sure thing.

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