#### Re: Bottleneck distance is not symmetric

Dmitriy Morozov

bottleneck_distance computes an approximation. The quality of the approximation is controlled by the delta argument, which by default is .01. Can you pass "delta=.001" to bottleneck_distance and see what happens?

bdist1 = d.bottleneck_distance(dgms1[1], dgms2[1], delta=.001)
bdist2 = d.bottleneck_distance(dgms2[1], dgms1[1], delta=.001)

Symmetry is not guaranteed, but the answers should get closer together (and closer to the correct answer).

On Sun, Nov 18, 2018 at 9:58 AM <nukpezah@...> wrote:

[Edited Message Follows]

Dear Dmitriy,
I am also running into the same issue and am not sure why. I computed pairwise bottleneck distances for 21 different NMR structures of a protein and realized that the distances are not symmetric also which should not be. I am running the code in a Jupyter notebook in Ubuntu. So I decided to test the code on Dmitriy's website for diagram distances and still running into same issues. This is the code below;
import numpy as np
import dionysus as d
f1 = d.fill_rips(np.random.random((20, 2)), 2, 1)
m1 = d.homology_persistence(f1)
dgms1 = d.init_diagrams(m1, f1)
f2 = d.fill_rips(np.random.random((20, 2)), 2, 1)
m2 = d.homology_persistence(f2)
dgms2 = d.init_diagrams(m2, f2)
bdist1 = d.bottleneck_distance(dgms1[1], dgms2[1])
print("Bottleneck distance between 1-dimensional persistence diagrams:", bdist1)
bdist2 = d.bottleneck_distance(dgms2[1], dgms1[1])
print("Bottleneck distance between 1-dimensional persistence diagrams:", bdist2)

```Bottleneck distance between 1-dimensional persistence diagrams: 0.050108347088098526
Bottleneck distance between 1-dimensional persistence diagrams: 0.04992149770259857Thanks for any help!I am running dionysus ver 2.06 in Ubuntu 18.04.1 LTSSincerelyJonathan```

Join dionysus@groups.io to automatically receive all group messages.