
The function gridFiltration
computes the Persistence Diagram of a filtration of sublevel sets (or superlevel sets) of a function evaluated over a grid of points in arbitrary dimension d
.
gridFiltration(
X = NULL, FUN = NULL, lim = NULL, by = NULL, FUNvalues = NULL,
maxdimension = max(NCOL(X), length(dim(FUNvalues))) - 1,
sublevel = TRUE, printProgress = FALSE, ...)
The function gridFiltration
returns a list with the following elements:
a list representing the complex. Its i-th element represents the vertices of i-th simplex.
a vector representing the filtration values. Its i-th element represents the filtration value of i-th simplex.
a logical variable indicating if the filtration values are in increasing order (TRUE
) or in decreasing order (FALSE
).
only if both lim
and by
are not NULL
: a matrix representing the coordinates of vertices. Its i-th row represents the coordinate of i-th vertex.
an FUN
, where X
and NULL
.
a function whose inputs are 1) an X
, 2) an Grid
, 3) an optional smoothing parameter, and returns a numeric vector of length distFct
, kde
, and dtm
which compute the distance function, the kernel density estimator and the distance to measure, over a grid of points using the input X
. Note that Grid
is not an input of gridFiltration
, but is automatically computed by the function using lim
, and by
. NULL if this option is not used. The default value is NULL
.
a FUN
is evaluated. NULL if this option is not used. The default value is NULL
.
either a number or a vector of length NULL
.
an NULL
.
a number that indicates the maximum dimension of the homological features to compute: 0
for connected components, 1
for loops, 2
for voids and so on. The default value is
a logical variable indicating if the Persistence Diagram should be computed for sublevel sets (TRUE
) or superlevel sets (FALSE
) of the function. The default value is TRUE
.
if TRUE
a progress bar is printed. The default value is FALSE
.
additional parameters for the function FUN
.
Brittany T. Fasy, Jisu Kim, and Fabrizio Lecci
If the values of X
, FUN
are set, then FUNvalues
should be NULL
. In this case, gridFiltration
evaluates the function FUN
over a grid. If the value of FUNvalues
is set, then X
, FUN
should be NULL
. In this case, FUNvalues
is used as function values over the grid.
Once function values are either computed or given, gridFiltration
constructs a filtration by triangulating the grid and considering the simplices determined by the values of the function of dimension up to maxdimension+1
.
Fasy B, Lecci F, Rinaldo A, Wasserman L, Balakrishnan S, Singh A (2013). "Statistical Inference For Persistent Homology." (arXiv:1303.7117). Annals of Statistics.
Morozov D (2007). "Dionysus, a C++ library for computing persistent homology." https://www.mrzv.org/software/dionysus/
Bauer U, Kerber M, Reininghaus J (2012). "PHAT, a software library for persistent homology." https://bitbucket.org/phat-code/phat/
summary.diagram
, plot.diagram
,
distFct
, kde
, kernelDist
, dtm
,
alphaComplexDiag
, alphaComplexDiag
, ripsDiag
# input data
n <- 10
XX <- circleUnif(n)
## Ranges of the grid
Xlim <- c(-1, 1)
Ylim <- c(-1, 1)
lim <- cbind(Xlim, Ylim)
by <- 1
#Distance Function Diagram of the sublevel sets
FltGrid <- gridFiltration(
XX, distFct, lim = lim, by = by, sublevel = TRUE, printProgress = TRUE)
Run the code above in your browser using DataLab