computeECC: A Vector Summary of the Euler Characteristic Curve

View source: R/RcppExports.R

computeECCR Documentation

A Vector Summary of the Euler Characteristic Curve

Description

Vectorizes the Euler characteristic curve

χ(t)=∑_{k=0}^d (-1)^kβ_k(t),

where β_0,β_1,…,β_d are the Betti curves corresponding to persistence diagrams D_0,D_1,…,D_d of dimeansions 0,1,…,d respectively, all computed from the same filtration

Usage

computeECC(D, maxhomDim, scaleSeq)

Arguments

D

matrix with three columns containing the dimension, birth and death values respectively

maxhomDim

maximum homological dimension considered (0 for H_0, 1 for H_1, etc.)

scaleSeq

numeric vector of increasing scale values used for vectorization

Value

A numeric vector whose elements are the average values of the Euler characteristic curve computed between each pair of consecutive scale points of scaleSeq=\{t_1,t_2,…,t_n\}:

\Big(\frac{1}{Δ t_1}\int_{t_1}^{t_2}χ(t)dt,\frac{1}{Δ t_2}\int_{t_2}^{t_3}χ(t)dt,…,\frac{1}{Δ t_{n-1}}\int_{t_{n-1}}^{t_n}χ(t)dt\Big),

where Δ t_k=t_{k+1}-t_k

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 
set.seed(123)
# sample N points uniformly from unit circle and add Gaussian noise
X <- TDA::circleUnif(N,r=1) + rnorm(2*N,mean = 0,sd = 0.2)

# compute a persistence diagram using the Rips filtration built on top of X
D <- TDA::ripsDiag(X,maxdimension = 1,maxscale = 2)$diagram 

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

# compute ECC 
computeECC(D,maxhomDim=1,scaleSeq)

TDAvec documentation built on Oct. 31, 2022, 5:06 p.m.