Skip to content

Commit

Permalink
Merge branch 'master' into prepare_v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rflamary authored May 4, 2020
2 parents 904edc0 + e65c1f7 commit 321d454
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 88 deletions.
7 changes: 7 additions & 0 deletions .github/requirements_strict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
numpy==1.16.*
scipy==1.0.*
cython==0.23.*
matplotlib
cvxopt
scikit-learn
pytest
32 changes: 30 additions & 2 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build

on:
push:
branches:
- '**'

pull_request:

create:
branches:
- 'master'
Expand Down Expand Up @@ -49,6 +49,34 @@ jobs:
codecov
linux-minimal-deps:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/requirements_strict.txt
pip install pytest
pip install -U "sklearn"
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
python -m pytest -v test/ ot/ --ignore ot/gpu/
macos:
runs-on: macOS-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ year={2017}

The library has been tested on Linux, MacOSX and Windows. It requires a C++ compiler for building/installing the EMD solver and relies on the following Python modules:

- Numpy (>=1.11)
- Numpy (>=1.16)
- Scipy (>=1.0)
- Cython (>=0.23)
- Matplotlib (>=1.5)
Expand Down
6 changes: 3 additions & 3 deletions examples/barycenters/plot_free_support_barycenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
2D free support Wasserstein barycenters of distributions
====================================================
Illustration of 2D Wasserstein barycenters if discributions that are weighted
Illustration of 2D Wasserstein barycenters if distributions are weighted
sum of diracs.
"""
Expand All @@ -21,7 +21,7 @@
##############################################################################
# Generate data
# -------------
#%% parameters and data generation

N = 3
d = 2
measures_locations = []
Expand All @@ -46,7 +46,7 @@

##############################################################################
# Compute free support barycenter
# -------------
# -------------------------------

k = 10 # number of Diracs of the barycenter
X_init = np.random.normal(0., 1., (k, d)) # initial Dirac locations
Expand Down
2 changes: 1 addition & 1 deletion examples/domain-adaptation/plot_otda_d2.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import ot.plot

##############################################################################
# generate data
# Generate data
# -------------

n_samples_source = 150
Expand Down
4 changes: 2 additions & 2 deletions examples/domain-adaptation/plot_otda_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
a linear or a kernelized mapping as introduced in [8].
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard,
"Mapping estimation for discrete optimal transport",
Neural Information Processing Systems (NIPS), 2016.
"Mapping estimation for discrete optimal transport",
Neural Information Processing Systems (NIPS), 2016.
"""

# Authors: Remi Flamary <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[6] Ferradans, S., Papadakis, N., Peyre, G., & Aujol, J. F. (2014). Regularized
discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard, "Mapping estimation for
discrete optimal transport", Neural Information Processing Systems (NIPS), 2016.
Expand Down
11 changes: 6 additions & 5 deletions examples/gromov/plot_barycenter_fgw.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
Plot graphs' barycenter using FGW
=================================
This example illustrates the computation barycenter of labeled graphs using FGW
This example illustrates the computation barycenter of labeled graphs using
FGW [18].
Requires networkx >=2
.. [18] Vayer Titouan, Chapel Laetitia, Flamary R{\'e}mi, Tavenard Romain
and Courty Nicolas
"Optimal Transport for structured data with application on graphs"
International Conference on Machine Learning (ICML). 2019.
[18] Vayer Titouan, Chapel Laetitia, Flamary Rémi, Tavenard Romain
and Courty Nicolas
"Optimal Transport for structured data with application on graphs"
International Conference on Machine Learning (ICML). 2019.
"""

Expand Down
10 changes: 5 additions & 5 deletions examples/gromov/plot_fgw.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
Plot Fused-gromov-Wasserstein
==============================
This example illustrates the computation of FGW for 1D measures[18].
This example illustrates the computation of FGW for 1D measures [18].
.. [18] Vayer Titouan, Chapel Laetitia, Flamary R{\'e}mi, Tavenard Romain
and Courty Nicolas
"Optimal Transport for structured data with application on graphs"
International Conference on Machine Learning (ICML). 2019.
[18] Vayer Titouan, Chapel Laetitia, Flamary Rémi, Tavenard Romain
and Courty Nicolas
"Optimal Transport for structured data with application on graphs"
International Conference on Machine Learning (ICML). 2019.
"""

Expand Down
4 changes: 2 additions & 2 deletions examples/plot_compute_emd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Plot multiple EMD
=================
Shows how to compute multiple EMD and Sinkhorn with two differnt
ground metrics and plot their values for diffeent distributions.
Shows how to compute multiple EMD and Sinkhorn with two different
ground metrics and plot their values for different distributions.
"""
Expand Down
6 changes: 3 additions & 3 deletions examples/plot_optim_OTreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
Illustrates the use of the generic solver for regularized OT with
user-designed regularization term. It uses Conditional gradient as in [6] and
generalized Conditional Gradient as proposed in [5][7].
generalized Conditional Gradient as proposed in [5,7].
[5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, Optimal Transport for
Domain Adaptation, in IEEE Transactions on Pattern Analysis and Machine
Intelligence , vol.PP, no.99, pp.1-1.
[6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014).
Regularized discrete optimal transport. SIAM Journal on Imaging Sciences,
7(3), 1853-1882.
Regularized discrete optimal transport. SIAM Journal on Imaging
Sciences, 7(3), 1853-1882.
[7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized
conditional gradient: analysis of convergence and applications.
Expand Down
7 changes: 5 additions & 2 deletions examples/plot_screenkhorn_1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
1D Screened optimal transport
===============================
This example illustrates the computation of Screenkhorn:
Screening Sinkhorn Algorithm for Optimal transport.
This example illustrates the computation of Screenkhorn [26].
[26] Alaya M. Z., Bérar M., Gasso G., Rakotomamonjy A. (2019).
Screening Sinkhorn Algorithm for Regularized Optimal Transport,
Advances in Neural Information Processing Systems 33 (NeurIPS).
"""

# Author: Mokhtar Z. Alaya <[email protected]>
Expand Down
Loading

0 comments on commit 321d454

Please sign in to comment.