Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206553

Why does H2 (homology group 2) appear in a 2-d(two-dimentional) plot in RIPSER?

$
0
0

I use RIPSER library in python to analyze my data(TDA). The plot(data) i have used is 2-d, but when i use ripser to analyze, it gives me output with three homology groups(H0, H1, H2). But this is not possible, since H0 represents the connected components and H1 represents the HOLES in 2-d plot, whereas H2 represents the VOID in the plot which is not possible in a 2-d plot.

Example

The code that i have used:

import matplotlib
import numpy as np
from ripser import ripser
from persim import plot_diagrams
from matplotlib import pyplot as plt


data = np.loadtxt('t=25_data(0.38).dat')
fig = plt.figure()
plt.title("PERSISTENCE DIAGRAM")
diagrams = ripser(data, maxdim=2)['dgms']     #### persistence diagram

### LIFETIME plot

plot_diagrams(diagrams, show=True)
plot_diagrams(diagrams, lifetime=True)

Viewing all articles
Browse latest Browse all 206553

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>