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

Persistence diagram and wasserstein distance using ripser vs torch_topological #41

Open
AmeerHamza96 opened this issue Oct 17, 2024 · 1 comment

Comments

@AmeerHamza96
Copy link

Hello,

  1. I have used ripser and torch_topological libraries to compute cubical persistence of the same image but the two two diagrams are different.
  2. About the wasserstein distance, I have tried to input same persistence diagram to persim.wasserstein and torch_topological.nn.wasserstein distance with same setting but the answers are different.

Can you please guide me what is the reason behind this? Am I doing something wrong? Is there a way to resolve this issue?

Ripser/Persim
"diagram1 = np.array([[0., 1.]])
diagram2 = np.array([[0., 1.],
[0., 1.]])
distance = persim.wasserstein(diagram2, diagram1)
output: Wasserstein distance: 0.7071067811865476"

with torch_topological
I got "tensor(0.5000)"

Thanks in advance.

@Pseudomanifold
Copy link
Contributor

Please provide more information about the code you are using in torch_topological.

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