diff options
author | Mokhtar Z. Alaya <mzalaya@Mokhtars-iMac.local> | 2020-01-18 07:15:09 +0100 |
---|---|---|
committer | Mokhtar Z. Alaya <mzalaya@Mokhtars-iMac.local> | 2020-01-18 07:15:09 +0100 |
commit | 3be0c215143e16c59ddd3be902416e91c3292937 (patch) | |
tree | 7785284d200ea9f5d4180e43fcb9e69ef8ef5fbf | |
parent | 55e4f76095e5cea22429846fc9d1a790d7eb691b (diff) |
clean
-rw-r--r-- | examples/plot_screenkhorn_1D.py | 2 | ||||
-rw-r--r-- | test/test_bregman.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/examples/plot_screenkhorn_1D.py b/examples/plot_screenkhorn_1D.py index 103d54c..7c0de82 100644 --- a/examples/plot_screenkhorn_1D.py +++ b/examples/plot_screenkhorn_1D.py @@ -59,7 +59,7 @@ ot.plot.plot1D_mat(a, b, M, 'Cost matrix M') # ----------------------- # Screenkhorn -lambd = 1e-3 # entropy parameter +lambd = 1e-03 # entropy parameter ns_budget = 30 # budget number of points to be keeped in the source distribution nt_budget = 30 # budget number of points to be keeped in the target distribution diff --git a/test/test_bregman.py b/test/test_bregman.py index bcec095..2398d45 100644 --- a/test/test_bregman.py +++ b/test/test_bregman.py @@ -348,4 +348,7 @@ def test_screenkhorn(): x = rng.randn(n, 2) M = ot.dist(x, x) - G_screen = ot.bregman.screenkhorn(a, b, M, 1e-2, uniform=True, verbose=True)
\ No newline at end of file + G_sink = ot.sinkhorn(a, b, M, 1e-03) + G_screen = ot.bregman.screenkhorn(a, b, M, 1e-03, uniform=True, verbose=True) + np.testing.assert_allclose(G_sink.sum(0), G_screen.sum(0), atol=1e-02) + np.testing.assert_allclose(G_sink.sum(1), G_screen.sum(1), atol=1e-02)
\ No newline at end of file |