How to use the persim.bottleneck_matching function in persim

To help you get started, we’ve selected a few persim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scikit-tda / persim / test / test_visuals.py View on Github external
def test_bottleneck_matching(self):
        dgm1 = np.array([
            [0.1, 0.2],
            [0.2, 0.4]
        ])
        dgm2 = np.array([
            [0.1, 0.2],
            [0.3, 0.45]
        ])

        d, (matching, D) = persim.bottleneck(dgm1, dgm2, matching=True)
        persim.bottleneck_matching(dgm1, dgm2, matching, D)
github scikit-tda / persim / test / test_visuals.py View on Github external
def test_plot_labels(self):
        dgm1 = np.array([
            [0.1, 0.2],
            [0.2, 0.4]
        ])
        dgm2 = np.array([
            [0.1, 0.2],
            [0.3, 0.45]
        ])

        d, (matching, D) = persim.bottleneck(dgm1, dgm2, matching=True)
        persim.bottleneck_matching(
            dgm1, dgm2, matching, D, labels=["X", "Y"])