WassersteinDistance: Metrics: Wasserstein Distance

WassersteinDistanceR Documentation

Metrics: Wasserstein Distance

Description

Computes the Wasserstein distance matrix from a list of persistence diagrams.

Super classes

rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::MetricStep -> WassersteinDistance

Methods

Public methods

Inherited methods

Method new()

The WassersteinDistance constructor.

Usage
WassersteinDistance$new(
  order = 1,
  internal_p = Inf,
  mode = c("hera", "pot"),
  delta = 0.01,
  n_jobs = 1
)
Arguments
order

An integer value specifying the exponent of the Wasserstein distance. Defaults to 1.0.

internal_p

An integer value specifying the ground metric on the (upper-half) plane (i.e. the norm \ell_p in R^2). Defaults to Inf.

mode

A string specifying the method for computing the Wasserstein distance. Choices are either "pot" or "hera". Defaults to "hera".

delta

A numeric value specifying the relative error 1+\delta. Defaults to 0.01. Used only if mode == "hera".

n_jobs

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

Returns

An object of class WassersteinDistance.


Method clone()

The objects of this class are cloneable with this method.

Usage
WassersteinDistance$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Mathieu Carrière

Examples


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 <- WassersteinDistance$new()
dis$apply(dgm, dgm)
dis$fit_transform(list(dgm))


rgudhi documentation built on March 31, 2023, 11:38 p.m.