persistent_homology: Persistent Homology

View source: R/simplicial.R

persistent_homologyR Documentation

Persistent Homology

Description

Computes persistent homology by building simplicial complexes at decreasing weight thresholds and tracking the birth/death of topological features.

Usage

persistent_homology(x, n_steps = 20L, max_dim = 3L)

Arguments

x

A square matrix, tna, or netobject.

n_steps

Number of filtration steps (default 20).

max_dim

Maximum simplex dimension to track (default 3).

Value

A persistent_homology object with:

betti_curve

Data frame: threshold, dimension, betti at each filtration step.

persistence

Data frame of birth-death pairs: dimension, birth, death, persistence.

thresholds

Numeric vector of filtration thresholds.

Examples

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)


Nestimate documentation built on April 20, 2026, 5:06 p.m.