Skip to contents

Computes the sliced Wasserstein distance matrix from a list of persistence diagrams. The Sliced Wasserstein distance is computed by projecting the persistence diagrams onto lines, comparing the projections with the 1-norm, and finally integrating over all possible lines. See http://proceedings.mlr.press/v70/carriere17a.html for more details.

Author

Mathieu Carrière

Super classes

rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::MetricStep -> SlicedWassersteinDistance

Methods

Inherited methods


Method new()

The SlicedWassersteinDistance constructor.

Usage

SlicedWassersteinDistance$new(num_directions = 10, n_jobs = 1)

Arguments

num_directions

An integer value specifying the number of lines evenly sampled from \([-\pi/2,\pi/2]\) in order to approximate and speed up the kernel computation. Defaults to 10L.

n_jobs

An integer value specifying the number of jobs to use for the computation. Defaults to 1L.

Returns

An object of class SlicedWassersteinDistance.


Method clone()

The objects of this class are cloneable with this method.

Usage

SlicedWassersteinDistance$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # reticulate::py_module_available("gudhi")
X <- seq_circle(10)
ac <- AlphaComplex$new(points = X)
st <- ac$create_simplex_tree()
dgm <- st$compute_persistence()$persistence_intervals_in_dimension(0)
ds <- DiagramSelector$new(use = TRUE)
dgm <- ds$apply(dgm)
dis <- SlicedWassersteinDistance$new()
dis$apply(dgm, dgm)
dis$fit_transform(list(dgm))
}