View source: R/gridFiltration.R
| gridFiltration | R Documentation |
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, ...)
X |
an |
FUN |
a function whose inputs are 1) an |
lim |
a |
by |
either a number or a vector of length |
FUNvalues |
an |
maxdimension |
a number that indicates the maximum dimension of the homological features to compute: |
sublevel |
a logical variable indicating if the Persistence Diagram should be computed for sublevel sets ( |
printProgress |
if |
... |
additional parameters for the function |
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.
The function gridFiltration returns a list with the following elements:
cmplx |
a list representing the complex. Its i-th element represents the vertices of i-th simplex. |
values |
a vector representing the filtration values. Its i-th element represents the filtration value of i-th simplex. |
increasing |
a logical variable indicating if the filtration values are in increasing order ( |
coordinates |
only if both |
The user can decide to use either the C++ library GUDHI, Dionysus, or PHAT. See references.
Since dimension of simplicial complex from grid points in R^d is up to d, homology of dimension \ge d is trivial. Hence setting maxdimension with values \ge d is equivalent to maxdimension=d-1.
Brittany T. Fasy, Jisu Kim, and Fabrizio Lecci
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.