Date
1  6 of 6
Bottleneck distances
Adam Spannaus
Hi Dimitri,
I am having an issue when computing the bottleneck distance between two diagrams. When both persistence diagrams have a point that has inf as its death time, the bottleneck distance seems to hang and not return a value. When computing these same values using the TDA package in R, I am able to compute these same distances, as it sets some finite number for the death at inf. Also, since the death time is an attribute, I cannot change it in my code to be some large number. Thanks for the assistance, Adam


Dmitriy Morozov
Can you send an example code or diagram?
On Tue, May 15, 2018 at 7:34 AM, <aspannau@...> wrote: Hi Dimitri,


Dmitriy Morozov
Never mind. I can reproduce the problem: import dionysus as d dgm1 = d.Diagram([(1,2), (3,4), (1., float('inf'))]) dgm2 = d.Diagram([(0,2), (3,5), (2., float('inf'))]) d.bottleneck_distance(dgm1,dgm2) I'll look into it. Let me meanwhile point out that you can construct a diagram out of a list of tuples of point coordinates. So you could always generate a list of points in the diagram and then generate a new diagram, tweaking the points however you like. So that could be a temporary workaround. BTW, TDA package in R uses Dionysus 1, so it has nothing in common with the code used in Dionysus 2.
On Tue, May 15, 2018 at 3:12 PM, Dmitriy Morozov <dmitriy@...> wrote:


Adam Spannaus
Hi Dimitri,
toggle quoted messageShow quoted text
Thanks for looking into it. If it helps, by looking at the distance between the same persistence diagram, even with a ‘inf’, gives the correct value of 0. On another note, would you happen to know, of can point me in a direction, as to why the computation of Wasserstein distances with the same diagrams is different in the TDA R package as compared with your implementation? Thanks for your assistance, Adam


Adam Spannaus
Dimitri,
toggle quoted messageShow quoted text
Apologies for all the emails, but I found, what I believe to be an error in the Rimplementation. It appears that when computing the wasserstein distance, the R version does not take the pth root of the value. I believe it computes the norm to the pth power. Thanks again, Adam


Dmitriy Morozov
Hi Adam, Can you please report this issue on GitHub, so I don't lose track of it? Thanks. Dmitriy
On Thu, May 17, 2018 at 12:27 PM, Adam Spannaus <aspannau@...> wrote:

