Computes persistent homology by building simplicial complexes at decreasing weight thresholds and tracking the birth/death of topological features.
Value
A persistent_homology object with:
- betti_curve
Data frame:
threshold,dimension,bettiat each filtration step.- persistence
Data frame of birth-death pairs:
dimension,birth,death,persistence.- thresholds
Numeric vector of filtration thresholds.
Examples
# \donttest{
seqs <- data.frame(
V1 = sample(LETTERS[1:4], 30, TRUE), V2 = sample(LETTERS[1:4], 30, TRUE),
V3 = sample(LETTERS[1:4], 30, TRUE), V4 = sample(LETTERS[1:4], 30, TRUE)
)
net <- build_network(seqs, method = "relative")
ph <- persistent_homology(net, n_steps = 15)
print(ph)
#> Persistent Homology
#> 15 filtration steps [0.3636 → 0.0036]
#> Features: b0: 4 (1 persistent)
#> Longest-lived:
#> b0: 0.3636 → 0.0000 (life: 0.3636)
#> b0: 0.3636 → 0.3122 (life: 0.0514)
#> b0: 0.3636 → 0.3122 (life: 0.0514)
# }