sidv23 / robust-PDs

Robust Persistence Diagrams using Reproducing Kernels (NeurIPS 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This page describes the method to construct robust persistence diagrams, as implemented in our paper Robust Persistence Diagrams using Reproducing Kernels.

You will need the following dependencies for implementing the analyses using R. Please run the following code:

pkgs <- c("dplyr","plotrix","spatstat","TDA","hitandrun","functional","Rfast","plotly","viridis","plot3D")
sapply(pkgs, install.packages, character.only=TRUE)

Here’s an example for computing the persistence diagrams

We start by sampling points 𝕏n from a circle in 2D with some uniform noise in the enclosing region.

set.seed(2020)
signal <- circleUnif(400,4)*rnorm(400,1,0.1)
noise <- matrix(runif(2*1000,-8,8),ncol=2)
X <- rbind(signal,noise)
plot(X,asp=1,pch=20,cex=0.4,col=alpha("black",0.7))
draw.circle(0,0,4,border = alpha('red',0.2),lwd=3)

Here are the persistence diagrams.

1. Distance Function Persistence Diagram

dgm.distFct <- ph.distfun(X,by=0.1,H=0)$diagram
plot.diagram(dgm.distFct)

2. DTM Persistence Diagram

dgm.dtm <- ph.dtm(X,by=0.1,m0 = M0(X,3))$diagram
plot.diagram(dgm.dtm)

3. KDE Persistence Diagram

dgm.kde <- ph.kde(X,by=0.1,H=bw(X,3))$diagram
plot.diagram(dgm.kde)

4. Robust Persistence Diagram

dgm.rkde <- ph.rkde2(X,by=0.1,H=bw(X,3))$diagram
plot.diagram(dgm.rkde)

About

Robust Persistence Diagrams using Reproducing Kernels (NeurIPS 2020)


Languages

Language:R 100.0%