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)

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 information
Returns:

  • d (float) – bottleneck distance between dgm1 and dgm2
  • matching (tuples of matched indices) – if input matching=True, then return matching
  • D ((N+M)x(N+M) cross-similarity matrix) – if input matching=True, then return D