| WassersteinDistance | R Documentation |
Computes the Wasserstein distance matrix from a list of persistence diagrams.
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::MetricStep -> WassersteinDistance
new()The WassersteinDistance constructor.
WassersteinDistance$new(
order = 1,
internal_p = Inf,
mode = c("hera", "pot"),
delta = 0.01,
n_jobs = 1
)orderAn integer value specifying the exponent of the Wasserstein
distance. Defaults to 1.0.
internal_pAn integer value specifying the ground metric on the
(upper-half) plane (i.e. the norm \ell_p in R^2). Defaults
to Inf.
modeA string specifying the method for computing the Wasserstein
distance. Choices are either "pot" or "hera". Defaults to "hera".
deltaA numeric value specifying the relative error
1+\delta. Defaults to 0.01. Used only if mode == "hera".
n_jobsAn integer value specifying the number of jobs to use for
the computation. Defaults to 1L.
An object of class WassersteinDistance.
clone()The objects of this class are cloneable with this method.
WassersteinDistance$clone(deep = FALSE)
deepWhether to make a deep clone.
Mathieu Carrière
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.