| persistent_homology | R Documentation |
Computes persistent homology via full boundary-matrix reduction over
\mathbb{Z}/2 (Edelsbrunner, Letscher & Zomorodian 2000). The
returned persistence diagram pairs each k-dimensional homology class
to the simplex whose addition creates it (birth) and the simplex whose
addition destroys it (death). Essential classes - those never killed -
are reported with death = 0 in clique mode (similarity scale,
descending) and death = Inf in VR mode (distance scale, ascending).
Two filtration modes are supported:
type = "clique"Weighted clique filtration. Input is
treated as a similarity matrix; high-weight simplices appear early.
For each k-simplex \sigma, the filtration value is
\min_{(i,j) \in \sigma}\,|w(i,j)|. Thresholds run high to low.
type = "vr"Vietoris-Rips filtration on a non-negative
distance matrix. For each k-simplex \sigma, the filtration
value is \max_{(i,j) \in \sigma}\,d(i,j). Thresholds run low
to high. Use max_scale to cap the filtration diameter.
persistent_homology(
x,
n_steps = 20L,
max_dim = 3L,
type = "clique",
max_scale = NULL
)
x |
A square matrix, |
n_steps |
Number of grid points for the reported Betti curve
(default 20). The persistence diagram itself is exact - it does not
depend on |
max_dim |
Maximum simplex dimension to track (default 3). |
type |
Filtration: |
max_scale |
For |
A persistent_homology object with:
Data frame: threshold, dimension,
betti.
Data frame of birth-death pairs:
dimension, birth, death, persistence.
Sorted by descending persistence.
Numeric vector of grid thresholds.
Either "clique" or "vr".
Edelsbrunner, H., Letscher, D., & Zomorodian, A. (2000). Topological persistence and simplification. Discrete & Computational Geometry 28, 511-533.
mat <- matrix(c(0,.6,.5,.6,0,.4,.5,.4,0), 3, 3)
colnames(mat) <- rownames(mat) <- c("A","B","C")
ph <- persistent_homology(mat, n_steps = 10)
print(ph)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.