Learn R Programming

kernelTDA (version 1.0.0)

pers.image: Persistence Image

Description

Compute the Persistence Image for a given diagram, using piecewise linear weight functions and Gaussian baseline distribution.

Usage

pers.image(d1, nbins, dimension, h)

Arguments

d1

A persistence diagram, in the form of a matrix with 3 columns (first one is the dimension, second is the birth-time, last one is the death-time).

nbins

Number of bins for the discretization of the Persistence Surface into the Persistence Image.

dimension

Dimension of the topological features of interest (0 for connected components, 1 for cycles etc).

h

Standard deviation of the Gaussian baseline used to compute the Persistence Surface.

Value

a nbins x nbins matrix containing the Persistence Image.

References

adams2017persistencekernelTDA

Examples

Run this code
# NOT RUN {
diag1 <- matrix(c(1,1,1,0,2,3,2,2.5,4), ncol = 3, byrow = FALSE)
colnames(diag1) <- c("dimension", "birth", "death")
pi1 <- pers.image(d1 = diag1, nbins = 20, dimension = 1, h = 1)
image(pi1) 
# }

Run the code above in your browser using DataLab