<p>The interpretation in terms of holes applies to the filtration defined as a union of balls around each data point, or equivalently to the Čech or α-complex filtrations. The Rips filtration is often used as an easier to compute approximation of that filtration, but it does not have the same theoretical properties. There are actually several publications studying higher dimensional persistent homology of the Vietoris-Rips filtration of a circle (<a href="https://arxiv.org/abs/1503.03669" rel="nofollow noreferrer">example</a>).</p>
<p>By the way, if you are working with points in low dimension with the Euclidean metric, it would probably make more sense to use an α-complex filtration, which is significantly smaller. You can get it with <a href="https://gudhi.inria.fr/" rel="nofollow noreferrer">Gudhi</a> or <a href="https://github.com/mrzv/diode" rel="nofollow noreferrer">DioDe</a>/<a href="https://www.mrzv.org/software/dionysus2/" rel="nofollow noreferrer">Dionysus 2</a> for instance.</p>
Why does H2 (homology group 2) appear in a 2-d(two-dimentional) plot in RIPSER?
<p>I use <code>RIPSER</code> library in python to analyze my <code>data(TDA)</code>. The <code>plot(data)</code> i have used is <code>2-d</code>, but when i use <code>ripser</code> to analyze, it gives me output with three homology <code>groups(H0, H1, H2)</code>. But this is not possible, since <code>H0</code> represents the connected components and <code>H1</code> represents the <code>HOLES</code> in <code>2-d</code> plot, whereas <code>H2</code> represents the <code>VOID</code> in the plot which is not possible in a <code>2-d plot</code>.</p>

<p><a href="https://i.stack.imgur.com/3Z2vy.png" rel="nofollow noreferrer">Example</a></p>

<p>The code that i have used:</p>

<pre><code>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)
</code></pre>