This is a class for computing the bottleneck distance matrix from a list of persistence diagrams.
:Requires: `CGAL <installation.html#cgal>`_ :math:`\geq` 4.11.0
◆ __init__()
def gudhi.representations.metrics.BottleneckDistance.__init__ |
( |
|
self, |
|
|
|
epsilon = None , |
|
|
|
n_jobs = None |
|
) |
| |
Constructor for the BottleneckDistance class.
Parameters:
epsilon (double): absolute (additive) error tolerated on the distance (default is the smallest positive float), see :func:`gudhi.bottleneck_distance`.
n_jobs (int): number of jobs to use for the computation. See :func:`pairwise_persistence_diagram_distances` for details.
◆ __call__()
def gudhi.representations.metrics.BottleneckDistance.__call__ |
( |
|
self, |
|
|
|
diag1, |
|
|
|
diag2 |
|
) |
| |
Apply BottleneckDistance on a single pair of persistence diagrams and outputs the result.
Parameters:
diag1 (n x 2 numpy array): first input persistence diagram.
diag2 (n x 2 numpy array): second input persistence diagram.
Returns:
float: bottleneck distance.
◆ fit()
def gudhi.representations.metrics.BottleneckDistance.fit |
( |
|
self, |
|
|
|
X, |
|
|
|
y = None |
|
) |
| |
Fit the BottleneckDistance class on a list of persistence diagrams: persistence diagrams are stored in a numpy array called **diagrams**.
Parameters:
X (list of n x 2 numpy arrays): input persistence diagrams.
y (n x 1 array): persistence diagram labels (unused).
◆ transform()
def gudhi.representations.metrics.BottleneckDistance.transform |
( |
|
self, |
|
|
|
X |
|
) |
| |
Compute all bottleneck distances between the persistence diagrams that were stored after calling the fit() method, and a given list of (possibly different) persistence diagrams.
Parameters:
X (list of n x 2 numpy arrays): input persistence diagrams.
Returns:
numpy array of shape (number of diagrams in **diagrams**) x (number of diagrams in X): matrix of pairwise bottleneck distances.
The documentation for this class was generated from the following file:
- src/python/gudhi/representations/metrics.py