Conducts a permutation test for nonparametric statistical inference of persistent homology in topological data analysis.

permutation_test(data1, data2, iterations, exponent = 1, update = 0,
  ...)

Arguments

data1

first dataset

data2

second dataset

iterations

number of iterations for distribution in permutation test

exponent

parameter `p` that returns Wasserstein-p metric

update

if greater than zero, will print a message every `update` iterations

...

arguments for `calculate_homology` used for each permutation; this includes the `format`, `dim`, and `threshold` parameters

Value

list containing results of permutation test

Details

The persistent homology of two point clouds are compared with the Wasserstein metric (where Wasserstein-1 is also known as the Earth Mover's Distance). However, the magnitude of the metric for a single pair of point clouds is meaningless without a reference distribution. This function uses a permutation test (permuting the points between the two clouds) as a nonparametric hypothesis test for statistical inference.

For more details on permutation tests for statistical inference in topological data analysis, see Robinson A, Turner K. Hypothesis testing for topological data analysis. J Appl Comput Topology. 2017; 1(2): 241-261.<doi:10.1007/s41468-017-0008-7>