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
rng gpu
  • Loading branch information
rflamary committed Jul 26, 2017
commit 2bc41ad8bb54c76bade6db2c0e04fa387ff29500
13 changes: 7 additions & 6 deletions test/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
@pytest.mark.skipif(nogpu, reason="No GPU available")
def test_gpu_sinkhorn():

np.random.seed(0)
rng = np.random.RandomState(0)

def describe_res(r):
print("min:{:.3E}, max::{:.3E}, mean::{:.3E}, std::{:.3E}".format(
np.min(r), np.max(r), np.mean(r), np.std(r)))

for n_samples in [50, 100, 500, 1000]:
print(n_samples)
a = np.random.rand(n_samples // 4, 100)
b = np.random.rand(n_samples, 100)
a = rng.rand(n_samples // 4, 100)
b = rng.rand(n_samples, 100)
time1 = time.time()
transport = ot.da.OTDA_sinkhorn()
transport.fit(a, b)
Expand All @@ -43,17 +43,18 @@ def describe_res(r):

@pytest.mark.skipif(nogpu, reason="No GPU available")
def test_gpu_sinkhorn_lpl1():
np.random.seed(0)

rng = np.random.RandomState(0)

def describe_res(r):
print("min:{:.3E}, max:{:.3E}, mean:{:.3E}, std:{:.3E}"
.format(np.min(r), np.max(r), np.mean(r), np.std(r)))

for n_samples in [50, 100, 500]:
print(n_samples)
a = np.random.rand(n_samples // 4, 100)
a = rng.rand(n_samples // 4, 100)
labels_a = np.random.randint(10, size=(n_samples // 4))
b = np.random.rand(n_samples, 100)
b = rng.rand(n_samples, 100)
time1 = time.time()
transport = ot.da.OTDA_lpl1()
transport.fit(a, labels_a, b)
Expand Down