Commit 0411ea2
[MRG] New API for OT solver (with pre-computed ground cost matrix) (#388)
* new API for OT solver
* use itertools for product of parameters
* add tests for result class
* add tests for result class
* add tests for result class last time?
* add sinkhorn
* make partial OT bckend compatible
* add TV as unbalanced flavor
* better tests
* make smoth backend compatible and add l2 tregularizatio to solve
* add reularizedd unbalanced
* add test for more complex attibutes
* add test for more complex attibutes
* add generic unbalaned solver and implement it for ot.solve
* add entropy to possible regularization
* star of documentation for ot.solv
* weird new pep8
* documenttaion for function ot.solve done
* pep8
* Update ot/solvers.py
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
* update release file
* Apply suggestions from code review
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
* add test NotImplemented
* pep8
* pep8gcmp pep8!
* compute kl in backend
* debug tensorflow kl backend
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>1 parent 8490196 commit 0411ea2
File tree
13 files changed
+1011
-18
lines changed- ot
- test
13 files changed
+1011
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
857 | 872 | | |
858 | 873 | | |
859 | 874 | | |
| |||
1158 | 1173 | | |
1159 | 1174 | | |
1160 | 1175 | | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1161 | 1179 | | |
1162 | 1180 | | |
1163 | 1181 | | |
| |||
1481 | 1499 | | |
1482 | 1500 | | |
1483 | 1501 | | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
1484 | 1505 | | |
1485 | 1506 | | |
1486 | 1507 | | |
| |||
1901 | 1922 | | |
1902 | 1923 | | |
1903 | 1924 | | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
1904 | 1928 | | |
1905 | 1929 | | |
1906 | 1930 | | |
| |||
2248 | 2272 | | |
2249 | 2273 | | |
2250 | 2274 | | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
2251 | 2278 | | |
2252 | 2279 | | |
2253 | 2280 | | |
| |||
2608 | 2635 | | |
2609 | 2636 | | |
2610 | 2637 | | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
2611 | 2641 | | |
2612 | 2642 | | |
2613 | 2643 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
| |||
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
152 | 165 | | |
153 | 166 | | |
154 | 167 | | |
155 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
156 | 172 | | |
157 | 173 | | |
158 | 174 | | |
| |||
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
256 | 276 | | |
257 | 277 | | |
258 | | - | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
262 | 286 | | |
263 | 287 | | |
264 | 288 | | |
| |||
267 | 291 | | |
268 | 292 | | |
269 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
270 | 297 | | |
271 | 298 | | |
272 | 299 | | |
273 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
274 | 303 | | |
275 | 304 | | |
276 | | - | |
| 305 | + | |
277 | 306 | | |
278 | | - | |
| 307 | + | |
279 | 308 | | |
280 | 309 | | |
281 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
| 515 | + | |
| 516 | + | |
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
517 | 520 | | |
518 | 521 | | |
519 | 522 | | |
520 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
521 | 528 | | |
522 | 529 | | |
523 | 530 | | |
524 | 531 | | |
525 | 532 | | |
526 | | - | |
| 533 | + | |
527 | 534 | | |
528 | 535 | | |
529 | | - | |
| 536 | + | |
530 | 537 | | |
531 | 538 | | |
532 | 539 | | |
| |||
0 commit comments