persim.bottleneck¶
-
persim.
bottleneck
(dgm1, dgm2, matching=False)[source]¶ Perform the Bottleneck distance matching between persistence diagrams. Assumes first two columns of S and T are the coordinates of the persistence points, but allows for other coordinate columns (which are ignored in diagonal matching).
See the distances notebook for an example of how to use this.
- Parameters
dgm1 (Mx(>=2)) – array of birth/death pairs for PD 1
dgm2 (Nx(>=2)) – array of birth/death paris for PD 2
matching (bool, default False) – if True, return matching infromation and cross-similarity matrix
- Returns
d (float) – bottleneck distance between dgm1 and dgm2
(matching, D) (Only returns if matching=True) – (tuples of matched indices, (N+M)x(N+M) cross-similarity matrix)