/MoMDist

Median of Means Distance

Primary LanguageJupyter Notebook

MoM Dist

This repository contains the code accompanying the paper Robust Topological Inference in the Presence of Outliers. The code uses the RobustTDA.jl package for computing MoMDist-weighted filtrations.

Getting Started

To get started, first clone the repository and start Julia.

$ git clone https://github.com/sidv23/momdist.git
$ cd ./momdist
$ julia

From the Julia REPL, you can enter the package manager by typing ], and activate the project environment with the required packages from the Project.toml file as follows.

julia> ]
pkg> activate .
pkg> instantiate

Alternatively, if you use the DrWatson.jl package, then you can quickly activate the project environment as follows.

julia> using DrWatson
julia> @quickactivate "momdist"

Contents

The notebooks directory contains the Jupyter notebooks for the experiments and simulations. The directory contains the following files:

  • calibration.ipynb: Experiment illustrating the auto-tuning procedure using Lepski's method and the resampling based heuristic procedure (See §4.1).

  • sublevel.ipynb: Comparison of sublevel filtration to the weighted-offset filtration for MoMDist (See §4.2).

  • high-dim.ipynb: High dimensional topological inference in the presence of outliers with MoMDist vis-à-vis DTM (See §4.3).

  • adversarial.ipynb: Illustration of recovering the true signal under adversarial contamination (See §4.4).

  • influence.ipynb: Influence analysis for MoMDist, DTM and RKDE-Distance in the adversarial setting (See §4.5).

The scripts directory contains the .jl source-code for the notebooks. All functions prefixed with rtda. are imported from the RobustTDA.jl package.

Troubleshooting

The code here uses the Ripserer.jl backend for computing persistent homology. The exact computation of persistent homology is achieved using the Alpha complex which, additionally, uses the MiniQHull.jl library, which has a known incompatibility with the Windows operating system (see here). If you're using Windows, then you can either:

  1. Use the windows subsystem for linux to run the code here, or
  2. You can change the relevant parts of the code to not use the Alpha complex, e.g., Alpha(Xn) => Xn.

For any other issues, please click here.