Topics

The plot_bars function's question

"Jay
 

Hi Dimitriy,

Thanks for quick reply again.

I have already submitted an issue on GitHub.

Dmitriy Morozov
 

It's the same problem. You should get an extra bar of infinite length in the second example. You in fact have the point in the diagram, if you examine it by hand, but it's not plotted.


On Thu, Feb 28, 2019 at 7:16 PM "Jay <zhw96@...> wrote:
Hi Dimitriy,

Thanks for quick reply.

In addition to the above problems, I also found an unreasonable exception,the plot bar always missing some longer bars when our radius is not bigger enough.

For example, the above example,
when I set radius = 8
when I set radius = 4

In my opinion, when I set the radius to 4, we should get 3 bars of length 3 instead of 2 bars of length 3.

"Jay
 

Hi Dimitriy,

Thanks for quick reply.

In addition to the above problems, I also found an unreasonable exception,the plot bar always missing some longer bars when our radius is not bigger enough.

For example, the above example,
when I set radius = 8
when I set radius = 4

In my opinion, when I set the radius to 4, we should get 3 bars of length 3 instead of 2 bars of length 3.

Dmitriy Morozov
 

Hi Jay,

It looks like we are not plotting points/bars at infinity. I don't recall doing this on purpose, so we should consider it a bug. Can you file an issue on GitHub?

Thanks.
Dmitriy

On Wed, Feb 27, 2019 at 8:23 PM "周浩文 <zhw96@...> wrote:
Hi Dimitriy,

I'm new to Dionysus (and to studying homology persistence),when I try to use Dionysus2 to achieve the learning-demo(from http://outlace.com/TDApart5.html),I got a problem which the plot_bars missing the longest bar in Betti 0,but the plot_bars work in Betti 1 is right.


 My achieve     should be
this is my code:

import numpy as np
import dionysus as d
from __future__ import print_function

data = np.array([[1,4],[1,1],[6,1],[6,4]],dtype='double')
f = d.fill_rips(data, 2, 8.0)
p = d.homology_persistence(f)
dgms = d.init_diagrams(p, f)

d.plot.plot_bars(dgms[0],order='birth')

when I want to print the p,I got these message:

<0> 0:
<1> 0:
<2> 0:
<3> 0:
<0,1> 3:1 * <0> 0+1 * <1> 0
<2,3> 3:1 * <2> 0+1 * <3> 0
<0,3> 5:1 * <0> 0+1 * <2> 0
<1,2> 5:
<0,2> 5.83095:
<1,3> 5.83095:
<0,1,2> 5.83095:1 * <0,1> 3+1 * <1,2> 5+1 * <0,2> 5.83095
<0,1,3> 5.83095:1 * <0,1> 3+1 * <0,3> 5+1 * <1,3> 5.83095
<0,2,3> 5.83095:1 * <0,1> 3+1 * <2,3> 3+1 * <0,3> 5+1 * <1,2> 5
<1,2,3> 5.83095:

Thank you very much!

Best,
Jay

"Jay
 

the right plot is 

"Jay
 

Hi Dimitriy,

I'm new to Dionysus (and to studying homology persistence),when I try to use Dionysus2 to achieve the learning-demo(from http://outlace.com/TDApart5.html),I got a problem which the plot_bars missing the longest bar in Betti 0,but the plot_bars work in Betti 1 is right.


 My achieve     should be
this is my code:

import numpy as np
import dionysus as d
from __future__ import print_function

data = np.array([[1,4],[1,1],[6,1],[6,4]],dtype='double')
f = d.fill_rips(data, 2, 8.0)
p = d.homology_persistence(f)
dgms = d.init_diagrams(p, f)

d.plot.plot_bars(dgms[0],order='birth')

when I want to print the p,I got these message:

<0> 0:
<1> 0:
<2> 0:
<3> 0:
<0,1> 3:1 * <0> 0+1 * <1> 0
<2,3> 3:1 * <2> 0+1 * <3> 0
<0,3> 5:1 * <0> 0+1 * <2> 0
<1,2> 5:
<0,2> 5.83095:
<1,3> 5.83095:
<0,1,2> 5.83095:1 * <0,1> 3+1 * <1,2> 5+1 * <0,2> 5.83095
<0,1,3> 5.83095:1 * <0,1> 3+1 * <0,3> 5+1 * <1,3> 5.83095
<0,2,3> 5.83095:1 * <0,1> 3+1 * <2,3> 3+1 * <0,3> 5+1 * <1,2> 5
<1,2,3> 5.83095:

Thank you very much!

Best,
Jay