Learn R Programming

TDA (version 1.9.1)

filtrationDiag: Persistence Diagram of Filtration

Description

The function filtrationDiag computes the persistence diagram of the filtration.

Usage

filtrationDiag(
    filtration, maxdimension, library = "GUDHI", location = FALSE,
    printProgress = FALSE, diagLimit = NULL)

Value

The function filtrationDiag returns a list with the following elements:

diagram

an object of class diagram, a \(P\) by 3 matrix, where \(P\) is the number of points in the resulting persistence diagram. The first column contains the dimension of each feature (0 for components, 1 for loops, 2 for voids, etc.). Second and third columns are Birth and Death of the features.

birthLocation

only if location=TRUE and if "Dionysus" is used for computing the persistence diagram: a vector of length \(P\). Each row represents the index of the vertex completing the simplex that gives birth to an homological feature.

deathLocation

only if location=TRUE and if "Dionysus" is used for computing the persistence diagram: a vector of length \(P\). Each row represents the index of the vertex completing the simplex that kills an homological feature.

cycleLocation

only if location=TRUE and if "Dionysus" is used for computing the persistence diagram: a \(P_i\) by \(h_i +1\) matrix for \(h_i\) dimensional homological feature. It represents index of \(h_i +1\) vertices of \(P_i\) simplices on a representative cycle of the \(h_i\) dimensional homological feature.

Arguments

filtration

a list representing the input filtration. This list consists of three components: "cmplx", a list representing the complex, "values", a vector representing the filtration values, and "increasing", a logical variable indicating if the filtration values are in increasing order or in decreasing order.

maxdimension

integer: max dimension of the homological features to be computed. (e.g. 0 for connected components, 1 for connected components and loops, 2 for connected components, loops, voids, etc.)

library

a string specifying which library to compute the persistence diagram. The user can choose either the library "GUDHI" or "Dionysus". The default value is "GUDHI".

location

if TRUE and if "Dionysus" is used for computing the persistence diagram, location of birth point, death point, and representative cycles, of each homological feature is returned.

printProgress

logical: if TRUE, a progress bar is printed. The default value is FALSE.

diagLimit

a number that replaces Inf in the persistence diagram. The default value is NULL and Inf value in the persistence diagram will not be replaced.

Author

Jisu Kim

Details

The user can decide to use either the C++ library GUDHI or Dionysus. See refereneces.

References

Maria C (2014). "GUDHI, Simplicial Complexes and Persistent Homology Packages." https://project.inria.fr/gudhi/software/ .

Morozov D (2007). "Dionysus, a C++ library for computing persistent homology". https://www.mrzv.org/software/dionysus/

Edelsbrunner H, Harer J (2010). "Computational topology: an introduction." American Mathematical Society.

Fasy B, Lecci F, Rinaldo A, Wasserman L, Balakrishnan S, Singh A (2013). "Statistical Inference For Persistent Homology." (arXiv:1303.7117). Annals of Statistics.

See Also

summary.diagram, plot.diagram

Examples

Run this code
n <- 5
X <- cbind(cos(2*pi*seq_len(n)/n), sin(2*pi*seq_len(n)/n))
maxdimension <- 1
maxscale <- 1.5
dist <- "euclidean"
library <- "Dionysus"

FltRips <- ripsFiltration(X = X, maxdimension = maxdimension,
               maxscale = maxscale, dist = "euclidean", library = "Dionysus",
               printProgress = TRUE)

DiagFltRips <- filtrationDiag(filtration = FltRips, maxdimension = maxdimension,
                   library = "Dionysus", location = TRUE, printProgress = TRUE)

plot(DiagFltRips[["diagram"]])


FUNvalues <- X[, 1] + X[, 2]

FltFun <- funFiltration(FUNvalues = FUNvalues, cmplx = FltRips[["cmplx"]])

DiagFltFun <- filtrationDiag(filtration = FltFun, maxdimension = maxdimension,
                             library = "Dionysus", location = TRUE, printProgress = TRUE)

plot(DiagFltFun[["diagram"]], diagLim = c(-2, 5))

Run the code above in your browser using DataLab