Relative persistent homology¶
For a pair of filtrations \((K, L)\) where \(L\) is a subcomplex of \(K\), the relative persistence diagram captures the cells of \(K\) that are not in \(L\) – equivalently, the homology of the quotient \(K / L\).
API¶
import oineus as oin
# fil_K = the big filtration; fil_L = the subcomplex you want to quotient by
dgms_rel = oin.compute_relative_diagrams(fil_K, fil_L, include_inf_points=True)
print(dgms_rel.in_dimension(0))
print(dgms_rel.in_dimension(1))
compute_relative_diagrams does the bookkeeping internally: it walks the
two filtrations, identifies which cells of \(K\) are missing from \(L\), and
returns the relative diagrams as a oineus.Diagrams object
indexed by homology dimension.
Relative diagrams vs. KICR¶
Both relative persistence and Kernel, image, cokernel persistence deal with pairs of filtrations, but they answer different questions:
Relative diagrams compute the persistence module of \(H_*(K, L)\) – the homology of the quotient.
KICR computes the kernel, image, and cokernel persistence modules of the map \(H_*(L) \to H_*(K)\) – three different modules tied to the long exact sequence of the pair.
A short exact sequence of complexes induces a long exact sequence of persistence modules; relative diagrams give you one piece, KICR gives you three. Pick the one that names the algebraic object you actually want.
See also¶
Kernel, image, cokernel persistence – the related kernel/image/cokernel construction.
Mapping cylinders – a different route to inclusion-style diagnostics when the map is not literally an inclusion.
tests/test_api_dgm.py,tests/test_kicr.py– runnable usage.