computeEulerCharacteristic {TDAvec}R Documentation

A Vector Summary of the Euler Characteristic Curve

Description

Vectorizes the Euler characteristic curve

\chi(t)=\sum_{k=0}^d (-1)^k\beta_k(t),

where \beta_0,\beta_1,\ldots,\beta_d are the Betti curves corresponding to persistence diagrams D_0,D_1,\ldots,D_d of dimensions 0,1,\ldots,d respectively, all computed from the same filtration. The evaluation method depends on the argument evaluate.

Usage

computeEulerCharacteristic(D, scaleSeq, maxhomDim = -1, evaluate = "intervals")

Arguments

D

a persistence diagram: a matrix with three columns containing the homological dimension, birth and death values respectively.

scaleSeq

a numeric vector of increasing scale values used for vectorization.

maxhomDim

the maximum homological dimension considered (0 for H_0, 1 for H_1, etc.). If set to -1 (default), it uses the maximum dimension found in D.

evaluate

a character string indicating the evaluation method. Must be either "intervals" (default) or "points".

Value

A numeric vector containing elements computed using scaleSeq=\{t_1,t_2,\ldots,t_n\} according to the method specified by evaluate. If D does not contain any points corresponding to homDim, a vector of zeros is returned.

Author(s)

Umar Islambekov

References

1. Richardson, E., & Werman, M. (2014). Efficient classification using the Euler characteristic. Pattern Recognition Letters, 49, 99-106.

Examples

N <- 100 # The number of points to sample

set.seed(123) # Set a random seed for reproducibility

# Sample N points uniformly from the unit circle and add Gaussian noise
theta <- runif(N, min = 0, max = 2 * pi)
X <- cbind(cos(theta), sin(theta)) + rnorm(2 * N, mean = 0, sd = 0.2)

# Compute the persistence diagram using the Rips filtration built on top of X
# The 'threshold' parameter specifies the maximum distance for building simplices
D <- TDAstats::calculate_homology(X, threshold = 2)

scaleSeq = seq(0, 2, length.out = 11) # A sequence of scale values

# Compute a vector summary of the Euler characteristic curve
computeEulerCharacteristic(D, scaleSeq)

[Package TDAvec version 0.1.41 Index]