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

The plot_bars function's question #36

Open
JayLoveLei opened this issue Mar 1, 2019 · 0 comments
Open

The plot_bars function's question #36

JayLoveLei opened this issue Mar 1, 2019 · 0 comments

Comments

@JayLoveLei
Copy link

JayLoveLei commented Mar 1, 2019

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 GitHub Logo
should be GitHub Logo

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

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

1 participant