Learn R Programming

TDA (version 1.3)

ripsDiag: Rips Persistence Diagram

Description

This function computes the persistence diagram of the Rips filtration built on top of a point cloud.

Usage

ripsDiag(X, maxdimension, maxscale, dist = "euclidean", 
         library="GUDHI", printProgress = FALSE)

Arguments

X
if dist="euclidean", X is an $n$ by $d$ matrix of coordinates, where $n$ is the number of points in the $d$-dimensional euclidean space. if dist="arbitrary", X is an $n$ by $n$ matrix of distances of $n$
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.)
maxscale
number: maximum value of the rips filtration.
dist
"euclidean" for Euclidean distance, "arbitrary" for an arbitrary distance given in input as a distance matrix.
library
if dist=='euclidean', the user can compute the Rips persistence diagram using either the library 'GUDHI', or 'Dionysus'. Default is 'GUDHI'.
printProgress
logical: if TRUE, a progress bar is printed. Default is FALSE.

Value

  • ripsDiag returns a list with the following elements:
  • diagraman 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.

Details

For Rips Diagrams based on Euclidean distance of the input point cloud, the user can decide to use either the C++ library GUDHI, or the C++ library Dionysus. For Rips Diagrams based on arbitrary distance, the the C++ library Dionysus is used. See refereneces.

References

Clement Maria, "GUDHI, Simplicial Complexes and Persistent Homology Packages". https://project.inria.fr/gudhi/software/.

Dmitriy Morozov, "Dionysus, a C++ library for computing persistent homology". http://www.mrzv.org/software/dionysus/

Herbert Edelsbrunner and John Harer (2010), Computational topology: an introduction. American Mathematical Society.

Brittany Fasy, Fabrizio Lecci, Alessandro Rinaldo, Larry Wasserman, Sivaraman Balakrishnan, and Aarti Singh. (2013), "Statistical Inference For Persistent Homology", (arXiv:1303.7117). To appear, Annals of Statistics.

See Also

summary.diagram, plot.diagram, gridDiag

Examples

Run this code
## EXAMPLE 1: rips diagram for circles (euclidean distance)
XX = circleUnif(30)
maxscale=5
maxdimension=1
## note that the input XX is a point cloud
Diag=ripsDiag(XX,maxdimension,maxscale, printProgress=TRUE)


## EXAMPLE 2: rips diagram with arbitrary distance
## distance matrix for triangle with edges of length: 1,2,4
distX=matrix(c(0,1,2,1,0,4,2,4,0), ncol=3)
maxscale=5
maxdimension=1
## note that the input distXX is a distance matrix
DiagTri=ripsDiag(distX,maxdimension,maxscale, dist="arbitrary", printProgress=TRUE)
#points with lifetime=0 are not shown. e.g. the loop of the triangle.
print(DiagTri$diagram)

Run the code above in your browser using DataLab