flamelet.band: Bootstrap Band for Persistence Flamelet

Description Usage Arguments Value References Examples

View source: R/functions.R

Description

Computes a bootstrap band around the 0 of the Persistence Flamelet. If the input is a list of data points observed at different scales, at each resolution, Persistence Diagrams are built for the sub/superlevel set of an arbitrary function computed on X, and then used to compute the Flamelet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
flamelet.band(
  X,
  B,
  alpha,
  base.type = "landscape",
  base.param = 1,
  dimension = 1,
  tseq,
  diag.fun = distFct,
  sublevel = TRUE,
  h.grid = NULL,
  lim = NULL,
  by = NULL
)

Arguments

X

a list of m matrix/data.frame containing the pointcloud at different resolutions. If X is a n-by-d matrix or a data.frame containing a d-dimensional pointcloud, this function computes the Flamelet on the corresponding diag.fun.

B

number of bootstrap repetitions needed to compute the confidence band over Persistence Diagrams.

alpha

the confidence level of the bootstrap confidence bands.

base.type

a string specifying whether the Flamelet is built from Persistence Landscapes ("landscape") or Persistence Silhouettes ("silhouettes").

base.param

the order k of the Flamelet (if base.type=="landscape") or the power p of the Flamelet (if base.type=="silhouette").

dimension

the topological dimension of the flamelet (0 for connected components, 1 for loops, ...)

tseq

a vector of values at which the Flamelet function is evaluated for a fixed scale level.

diag.fun

the function whose sub/super-level set define the persistent homology groups. Corresponds to the argument FUN of the gridDiag function in the TDA package.

sublevel

a logical indicating whether the Persistent Homology should be computed on sub or superlevel set of the function given as diag.fun.

h.grid

vector of bandwidths for the KDE, representing the scale parameter of the Flamelet.

lim

2-by-d matrix, where the i-th column contains the range of the grid over which the function specified in diag.fun is computed for the i-th variable.

by

a scalar (or a vector if different values are selected for each dimension). specifying spaces between elements on the grid whose outernmost element are defined by lim.

Value

The quantile of level alpha necessary to build the confidence band. More details can be found in Padellini (2017).

References

T. Padellini and P. Brutti (2017) Persistence Flamelets: multiscale Persistent Homology for kernel density exploration https://arxiv.org/abs/1709.07097

Examples

1
2
3
4
5
6
7
library(TDA)
xx = rbind(circleUnif(50, 1), circleUnif(50, 1.5) + 3)
Xlim = c(-1, 5);  Ylim = c(-1, 5);  by = 0.05
lim = cbind(Xlim, Ylim)
foo.band = flamelet.band(X = xx, B = 10, alpha = 0.95,
                  tseq = seq(0, .75, length.out = 500), diag.fun = kde,
                  h.grid = seq(0.01, 1, length.out = 40), lim = lim, by = by)

pflamelet documentation built on Dec. 17, 2020, 5:08 p.m.