build.flamelet: Persistence Flamelet

Description Usage Arguments Value References Examples

View source: R/functions.R

Description

Computes the Persistence Flamelet from a list of Persistence Diagrams. 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
15
16
17
18
build.flamelet(
  X,
  base.type = "landscape",
  base.param = 1,
  dimension = 1,
  tseq,
  diag.fun = distFct,
  sublevel = TRUE,
  h.grid = NULL,
  lim = NULL,
  by = NULL,
  scale = TRUE,
  precomputed.diagram = FALSE,
  info.message = FALSE,
  band = FALSE,
  B = 10,
  alpha = 0.95
)

Arguments

X

a list of m persistence diagrams representing the scale-space family at different resolutions, or 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 diag.fun.

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 dimension k containing the 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 dimension m containing 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.

scale

a logical indicating whether or not the Persistence Diagrams have to be scaled to be in the same range (needed only for visualization purposes).

precomputed.diagram

a logical indicating whether the Persistence Diagrams have to be computed or are given as input in the form of a list of diagrams.

info.message

a logical denoting if progress messages should be printed.

band

a logical indicating whether or not each Persistence Diagram should be cleaned by means of Bootstrap Bands (only possible when the Persistence Diagrams are computed within the function and are not given as an input).

B

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

alpha

the confidence level of the bootstrap confidence bands.

Value

a k-by-m matrix containing the Persistence Flamelet.

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.flamelet = build.flamelet(X = xx, h.grid = seq(0.01, 1, length.out = 40),
base.type = "landscape", dimension = 1,base.param = 1, lim = lim, by = by,
                            tseq = seq(0, .75, length.out = 500))

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