Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b2f91f2
full coveragre utils
rflamary Jul 24, 2017
c6e648f
test parmap python 3.5
rflamary Jul 24, 2017
a31d3c2
map to list
rflamary Jul 24, 2017
f8e822c
test sinkhorn with empty marginals
rflamary Jul 24, 2017
7d9c5e7
add test optim
rflamary Jul 24, 2017
709d8cb
add dr tests
rflamary Jul 24, 2017
83ecc6d
bregman coverage
rflamary Jul 24, 2017
64cf2fc
tets barycenter
rflamary Jul 24, 2017
33f3d30
clean pep8
rflamary Jul 24, 2017
bd705ed
add test yunmlix and bary
rflamary Jul 24, 2017
f204e98
add test da 58% coverage
rflamary Jul 24, 2017
5aad08a
add test plot
rflamary Jul 24, 2017
a8d7301
add test plot and dataset
rflamary Jul 24, 2017
e11b1d1
test plot with no X
rflamary Jul 24, 2017
11f0652
matplotlib travis
rflamary Jul 24, 2017
46f297f
import nmpy before ot
rflamary Jul 26, 2017
68d7490
numpy assert + n_bins
rflamary Jul 26, 2017
67b011a
numpy assert test_da
rflamary Jul 26, 2017
347e628
n to n_samples
rflamary Jul 26, 2017
4a45135
dr +gpu numpy assert
rflamary Jul 26, 2017
2bc41ad
rng gpu
rflamary Jul 26, 2017
6a02db0
test_optim
rflamary Jul 26, 2017
86418eb
test_optim allclose
rflamary Jul 26, 2017
286de0a
clean test_ot
rflamary Jul 26, 2017
0e06129
Merge branch 'pytest' of github.com:rflamary/POT into pytest
rflamary Jul 26, 2017
81118f2
test_ot random state
rflamary Jul 26, 2017
109fc2a
flake8
rflamary Jul 26, 2017
e0fa14b
flake8
rflamary Jul 26, 2017
d101e08
nearly all review done
rflamary Jul 26, 2017
77037cc
gitignore
rflamary Jul 26, 2017
fac003d
author and license for tets files
rflamary Jul 26, 2017
0097017
add license and authors on all modules
rflamary Jul 26, 2017
251af8e
add author to all examples
rflamary Jul 26, 2017
84aa318
pep8
rflamary Jul 26, 2017
96f8b96
valid flake8
rflamary Jul 26, 2017
838550e
last stuff
rflamary Jul 26, 2017
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bregman coverage
  • Loading branch information
rflamary committed Jul 24, 2017
commit 83ecc6df836d1a6b05bd641dfef465cc02b25b8f
10 changes: 6 additions & 4 deletions test/test_bregman.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ def test_sinkhorn_empty():

M = ot.dist(x, x)

G = ot.sinkhorn([], [], M, 1, stopThr=1e-10)
G, log = ot.sinkhorn([], [], M, 1, stopThr=1e-10, verbose=True, log=True)
# check constratints
assert np.allclose(u, G.sum(1), atol=1e-05) # cf convergence sinkhorn
assert np.allclose(u, G.sum(0), atol=1e-05) # cf convergence sinkhorn
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use np.testing.assert_allclose

it makes errors clearer than just an assert


G = ot.sinkhorn([], [], M, 1, stopThr=1e-10, method='sinkhorn_stabilized')
G, log = ot.sinkhorn([], [], M, 1, stopThr=1e-10,
method='sinkhorn_stabilized', verbose=True, log=True)
# check constratints
assert np.allclose(u, G.sum(1), atol=1e-05) # cf convergence sinkhorn
assert np.allclose(u, G.sum(0), atol=1e-05) # cf convergence sinkhorn

G = ot.sinkhorn(
[], [], M, 1, stopThr=1e-10, method='sinkhorn_epsilon_scaling')
G, log = ot.sinkhorn(
[], [], M, 1, stopThr=1e-10, method='sinkhorn_epsilon_scaling',
verbose=True, log=True)
# check constratints
assert np.allclose(u, G.sum(1), atol=1e-05) # cf convergence sinkhorn
assert np.allclose(u, G.sum(0), atol=1e-05) # cf convergence sinkhorn
Expand Down