| silhouette {TDA} | R Documentation |
The Persistence Silhouette Function
Description
The function silhouette 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 |
p |
a vector: 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. The default value is |
tseq |
a vector of values at which the silhouette function is evaluated. |
Value
The function silhouette returns a numeric matrix of with the number of row as the length of tseq and the number of column as the length of p. The value at ith row and jth column represents the value of the p[j]-th power silhouette function evaluated at tseq[i].
Author(s)
Fabrizio Lecci
References
Chazal F, Fasy BT, Lecci F, Rinaldo A, Wasserman L (2014). "Stochastic Convergence of Persistence Landscapes and Silhouettes." Proceedings of the 30th Symposium of Computational Geometry (SoCG). (arXiv:1312.0308)
See Also
Examples
Diag <- matrix(c(0, 0, 10, 1, 0, 3, 1, 3, 8), ncol = 3, byrow = TRUE)
DiagLim <- 10
colnames(Diag) <- c("dimension", "Birth", "Death")
#persistence silhouette
tseq <- seq(0, DiagLim, length = 1000)
Sil <- silhouette(Diag, p = 1, dimension = 1, tseq)
par(mfrow = c(1, 2))
plot.diagram(Diag)
plot(tseq, Sil, type = "l", xlab = "t", ylab = "silhouette", asp = 1)