Learn R Programming

TDA (version 1.0)

silhouette: The Persistence Silhouette Function

Description

This function computes the silhouette function corresponding to a given persistence diagram.

Usage

silhouette(Diag, p = 1, dimension = 1, 
           tseq = seq(min(Diag[, 2:3]), max(Diag[, 2:3]), length = 500))

Arguments

Diag
an object of class diagram or a $P$ by $3$ matrix, storing a persistence diagram with columns: "dimension", "Birth", "Death".
p
number: the power of the weights of the silhouette function. See the definition of silhouette function, Section 5 in the reference.
dimension
the dimension of the topological features under consideration. Default is 1 (loops).
tseq
a vector of values at which the silhouette function is evaluated.

Value

  • Returns a numeric vector of the same length of tseq, with the values of the silhouette function evaluated at the points of tseq.

References

Frederic Chazal, Brittany T. Fasy, Fabrizio Lecci, Alessandro Rinaldo, and Larry Wasserman, (2014), "Stochastic Convergence of Persistence Landscapes and Silhouettes", Proceedings of the 30th Symposium of Computational Geometry (SoCG). (arXiv:1312.0308)

See Also

landscape

Examples

Run this code
XX1 = circleUnif(30)
XX2 = circleUnif(30, r=2) +3
XX=rbind(XX1,XX2)

DiagLim=5
maxdimension=1
## note that the input XX is a point cloud
Diag=ripsDiag(XX,maxdimension,DiagLim, printStatus=TRUE)

#persistence silhouette
tseq=seq(0,DiagLim, length=1000)
Sil=silhouette(Diag, p=1,  dimension=1, tseq)

plot(tseq, Sil, type="l", xlab="t", ylab="silhouette", asp=1)

Run the code above in your browser using DataLab