| diag2landscape {TDAkit} | R Documentation | 
Convert Persistence Diagram into Persistence Landscape
Description
Persistence Landscape (PL) is a functional summary of persistent homology 
that is constructed given a homology object.
Usage
diag2landscape(homology, dimension = 1, k = 0, nseq = 1000)
Arguments
| homology | an object of S3 class  | 
| dimension | dimension of features to be considered (default: 1). | 
| k | the number of top landscape functions to be used (default: 0). When  | 
| nseq | grid size for which the landscape function is evaluated (default: 1000). | 
Value
a list object of "landscape" class containing
- lambda
- an - (\code{nseq} \times k)landscape functions.
- tseq
- a length- - nseqvector of domain grid.
- dimension
- dimension of features considered. 
References
Peter Bubenik (2018). “The Persistence Landscape and Some of Its Properties.” arXiv:1810.04963.
Examples
# ---------------------------------------------------------------------------
#              Persistence Landscape of 'iris' Dataset
#
# We will extract landscapes of dimensions 0, 1, and 2.
# For each feature, only the top 5 landscape functions are plotted.
# ---------------------------------------------------------------------------
## Prepare 'iris' data
XX = as.matrix(iris[,1:4])
## Compute Persistence Diagram 
pdrips = diagRips(XX, maxdim=2)
## Convert to Landscapes of Each Dimension
land0 <- diag2landscape(pdrips, dimension=0, k=5)
land1 <- diag2landscape(pdrips, dimension=1, k=5)
land2 <- diag2landscape(pdrips, dimension=2, k=5)
## Visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(2,2))
plot(pdrips$Birth, pdrips$Death, col=as.factor(pdrips$Dimension),
     pch=19, main="persistence diagram", xlab="Birth", ylab="Death")
matplot(land0$tseq, land0$lambda, type="l", lwd=3, main="dimension 0", xlab="t")
matplot(land1$tseq, land1$lambda, type="l", lwd=3, main="dimension 1", xlab="t")
matplot(land2$tseq, land2$lambda, type="l", lwd=3, main="dimension 2", xlab="t")
par(opar)
[Package TDAkit version 0.1.2 Index]