Learn R Programming

TDA (version 1.0)

multipBootstrap: Multiplier Bootstrap for Persistence Landscapes and Silhouettes

Description

This function computes a confidence band for the average landscape (or the average silhouette) using the multiplier bootstrap.

Usage

multipBootstrap(Y, B=30, alpha=0.05, parallel=FALSE, printStatus=FALSE)

Arguments

Y
an $N$ by $m$ matrix of values of $N$ persistence landscapes (or silhouettes) evaluated over a 1 dimensional grid of length $m$.
B
the number of bootstrap iterations.
alpha
multipBootstrap returns a 1-alpha confidence band for the mean landscape (or silhouette).
parallel
logical: if TRUE the bootstrap iterations are parallelized, using the library parallel.
printStatus
logical: if TRUE a progress bar is printed. Default is FALSE.

Value

  • Returns a list with the following elements:
  • widthnumber: half of the width of the unfiorm confidence band; that is, the distance of the upper and lower limits of the band from the empirical average landscape (or silhouette).
  • meana numeric vector of length $m$, storing the values of the empirical average landscape (or silhouette) over a 1 dimensional grid of length $m$.
  • bandan $m$ by 2 matrix that stores the values of the lower limit of the confidence band (first column) and upper limit of the confidence band (second column), evaluated over a 1 dimensional grid of length $m$.

Details

See Algorithm 1 in the reference.

References

Chazal, F., Fasy, B.T., Lecci, F., Rinaldo, A., and Wasserman, L., (2014), "Stochastic Convergence of Persistence Landscapes and Silhouettes", Proceedings of the 30th Symposium of Computational Geometry (SoCG). (arXiv:1312.0308)

See Also

landscape, silhouette

Examples

Run this code
nn=3000  #large sample size
mm=50   #small subsample size
NN=5    #we will compute NN diagrams using subsamples of size mm

XX = circleUnif(nn)  ## large sample from the unit circle

DiagLim=2
maxdimension=1
tseq=seq(0,DiagLim, length=1000)

Diags=list()    #here we will store the NN rips diagrams
                #constructed using different subsamples of mm points
Lands=matrix(0,nrow=NN, ncol=length(tseq))  #here we'll store the landscapes

for (i in 1:NN){
	subXX=XX[sample(1:nn,mm),]
	Diags[[i]]=ripsDiag(subXX,maxdimension,DiagLim)
	Lands[i,]=landscape(Diags[[i]], dimension=1, KK=1, tseq )
}

## now we use the NN landscapes to construct a confidence band
B=50
alpha=0.05
boot=multipBootstrap(Lands,B,alpha)

LOWband=boot$band[,1]
UPband=boot$band[,2]
MeanLand=boot$mean

plot(tseq, MeanLand, type="l", lwd=2, xlab="", ylab="" ,
     main="Mean Landscape with band", ylim=c(0,1.2))
polygon(c(tseq, rev(tseq)), c(LOWband,rev(UPband)), col="pink")
lines(tseq, MeanLand, lwd=1, col=2)

Run the code above in your browser using DataLab