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

Calculating Hyperbolicity bug in delta.py? #12

Closed
ajbanks opened this issue Aug 7, 2021 · 1 comment
Closed

Calculating Hyperbolicity bug in delta.py? #12

ajbanks opened this issue Aug 7, 2021 · 1 comment

Comments

@ajbanks
Copy link

ajbanks commented Aug 7, 2021

I have tried to reproduce your hyperbolicity experiments with the cifar10 dataset, using the code in delta.py. I have stumbled across a potential error. In the paper you calculate the relative Hyperbolicity of a dataset by doing the following calculation:

δrel(X) = 2δ(X) / diam(X)

However, in the delta.py δ(X) is not multiplied by 2, giving incorrect results:
delta_rel = delta_hyp(distmat) / diam

When I multiply by 2 it seems to work and I can reproduce the cifar10 hyperbolicity score:

delta_rel = (2 * delta_hyp(distmat)) / diam

Is this change correct?

@ajbanks ajbanks changed the title Error in calculating Hyperbolicity? Calculating Hyperbolicity bug in delta.py? Aug 7, 2021
@leymir
Copy link
Owner

leymir commented Jan 12, 2022

Hello, thank you for pointing this out. The correct formula is given in the paper, I'll fix the code.

@leymir leymir closed this as completed Jan 12, 2022
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