pytorch-topological icon indicating copy to clipboard operation
pytorch-topological copied to clipboard

Persistence diagram and wasserstein distance using ripser vs torch_topological

Open AmeerHamza96 opened this issue 1 year ago • 1 comments

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.

AmeerHamza96 avatar Oct 17 '24 12:10 AmeerHamza96