Wasserstein Distance Between Persistence Diagrams
Source:R/simplicial_distances.R
hg_wasserstein.RdComputes the finite-order Wasserstein distance between persistence
diagrams. For order \(q\), it minimizes the sum of powered matching
costs over bijections between diagram points and copies of the diagonal,
then takes the \(q\)-th root. Point-to-point costs use an
\(L_p\) ground metric; internal_p = Inf gives the usual
\(L_\infty\) convention used by GUDHI.
Arguments
- d1, d2
persistent_homologyobjects fromhg_homology(), or data.frames with columnsdimension,birth,death.- dimension
Integer vector of dimensions to compare.
NULL(default) compares all dimensions appearing in either diagram.- order
Finite Wasserstein order, a number greater than or equal to one. The common choices are
1and2.- internal_p
Ground-metric order, a number greater than or equal to one or
Inf(the default).
Details
Finite points may match the diagonal. Essential classes (death = Inf
in Vietoris–Rips mode or death = 0 in clique mode) are matched only to
essential classes. A dimension whose essential counts differ has distance
Inf. The finite assignment is solved exactly with a native Hungarian
algorithm, so no optional optimization package is required.
References
Kerber, M., Morozov, D., & Nigmetov, A. (2017). Geometry helps to compare persistence diagrams. Journal of Experimental Algorithmics, 22, 1–20. doi:10.1145/3064175
Examples
d1 <- data.frame(dimension = 0L, birth = 0, death = 2)
d2 <- data.frame(dimension = 0L, birth = 0, death = 3)
hg_wasserstein(d1, d2)
#> dim_0
#> 1