Metrics: Sliced Wasserstein Distance
Source:R/representation-metrics.R
SlicedWassersteinDistance.Rd
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.
Super classes
rgudhi::PythonClass
-> rgudhi::SKLearnClass
-> rgudhi::MetricStep
-> SlicedWassersteinDistance
Methods
Method new()
The SlicedWassersteinDistance
constructor.
Usage
SlicedWassersteinDistance$new(num_directions = 10, n_jobs = 1)
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))
}