summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2017-09-01 17:55:32 +0200
committerRémi Flamary <remi.flamary@gmail.com>2017-09-01 17:55:32 +0200
commit8ea3504c3bfe9c9440982f8ad0d172a240d54aff (patch)
tree7e3241cf4d81869610feea53f165407767614846
parentfd76b98726b8f22606d93bb24dc539967472f4a0 (diff)
good notebook format generated by sphinx gallery
-rwxr-xr-xdocs/nb_build3
-rw-r--r--docs/source/auto_examples/auto_examples_jupyter.zipbin70289 -> 67774 bytes
-rw-r--r--docs/source/auto_examples/auto_examples_python.zipbin46532 -> 44112 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_001.pngbin20707 -> 22153 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_002.pngbin21335 -> 21589 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_005.pngbin9613 -> 9645 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_006.pngbin83657 -> 91095 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_009.pngbin14178 -> 13987 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_010.pngbin98951 -> 109742 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_WDA_001.pngbin55744 -> 54285 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_WDA_003.pngbin86112 -> 86366 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_classes_001.pngbin49949 -> 51418 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_classes_003.pngbin189153 -> 199721 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_d2_001.pngbin131873 -> 135206 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_d2_003.pngbin240262 -> 241976 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_d2_006.pngbin104502 -> 108946 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_001.pngbin37940 -> 35881 bytes
-rw-r--r--docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_003.pngbin76017 -> 73815 bytes
-rw-r--r--docs/source/auto_examples/images/thumb/sphx_glr_plot_OT_2D_samples_thumb.pngbin22370 -> 24711 bytes
-rw-r--r--docs/source/auto_examples/images/thumb/sphx_glr_plot_WDA_thumb.pngbin85660 -> 87479 bytes
-rw-r--r--docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_classes_thumb.pngbin29948 -> 30678 bytes
-rw-r--r--docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_d2_thumb.pngbin54746 -> 53014 bytes
-rw-r--r--docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_mapping_thumb.pngbin19281 -> 18473 bytes
-rw-r--r--docs/source/auto_examples/plot_OT_1D.ipynb6
-rw-r--r--docs/source/auto_examples/plot_OT_1D.py8
-rw-r--r--docs/source/auto_examples/plot_OT_1D.rst10
-rw-r--r--docs/source/auto_examples/plot_OT_2D_samples.ipynb8
-rw-r--r--docs/source/auto_examples/plot_OT_2D_samples.py8
-rw-r--r--docs/source/auto_examples/plot_OT_2D_samples.rst10
-rw-r--r--docs/source/auto_examples/plot_OT_L1_vs_L2.ipynb8
-rw-r--r--docs/source/auto_examples/plot_OT_L1_vs_L2.py8
-rw-r--r--docs/source/auto_examples/plot_OT_L1_vs_L2.rst10
-rw-r--r--docs/source/auto_examples/plot_WDA.ipynb10
-rw-r--r--docs/source/auto_examples/plot_WDA.py10
-rw-r--r--docs/source/auto_examples/plot_WDA.rst82
-rw-r--r--docs/source/auto_examples/plot_barycenter_1D.ipynb8
-rw-r--r--docs/source/auto_examples/plot_barycenter_1D.py8
-rw-r--r--docs/source/auto_examples/plot_barycenter_1D.rst10
-rw-r--r--docs/source/auto_examples/plot_compute_emd.ipynb8
-rw-r--r--docs/source/auto_examples/plot_compute_emd.py8
-rw-r--r--docs/source/auto_examples/plot_compute_emd.rst10
-rw-r--r--docs/source/auto_examples/plot_optim_OTreg.ipynb10
-rw-r--r--docs/source/auto_examples/plot_optim_OTreg.py10
-rw-r--r--docs/source/auto_examples/plot_optim_OTreg.rst12
-rw-r--r--docs/source/auto_examples/plot_otda_classes.ipynb8
-rw-r--r--docs/source/auto_examples/plot_otda_classes.py10
-rw-r--r--docs/source/auto_examples/plot_otda_classes.rst54
-rw-r--r--docs/source/auto_examples/plot_otda_color_images.ipynb10
-rw-r--r--docs/source/auto_examples/plot_otda_color_images.py10
-rw-r--r--docs/source/auto_examples/plot_otda_color_images.rst12
-rw-r--r--docs/source/auto_examples/plot_otda_d2.ipynb12
-rw-r--r--docs/source/auto_examples/plot_otda_d2.py17
-rw-r--r--docs/source/auto_examples/plot_otda_d2.rst19
-rw-r--r--docs/source/auto_examples/plot_otda_mapping.ipynb8
-rw-r--r--docs/source/auto_examples/plot_otda_mapping.py8
-rw-r--r--docs/source/auto_examples/plot_otda_mapping.rst44
-rw-r--r--docs/source/auto_examples/plot_otda_mapping_colors_images.ipynb10
-rw-r--r--docs/source/auto_examples/plot_otda_mapping_colors_images.py10
-rw-r--r--docs/source/auto_examples/plot_otda_mapping_colors_images.rst12
-rw-r--r--docs/source/conf.py2
60 files changed, 235 insertions, 276 deletions
diff --git a/docs/nb_build b/docs/nb_build
index 979a913..7f74c70 100755
--- a/docs/nb_build
+++ b/docs/nb_build
@@ -11,5 +11,4 @@ make html
sed -i "s/'sphinx\_gallery/#'sphinx\_gallery/" source/conf.py
sed -i "s/#sys.modules.update/sys.modules.update/" source/conf.py
-
-
+#rsync --out-format="%n" --update source/auto_examples/*.ipynb ../notebooks2
diff --git a/docs/source/auto_examples/auto_examples_jupyter.zip b/docs/source/auto_examples/auto_examples_jupyter.zip
index f7698ad..fc1d4de 100644
--- a/docs/source/auto_examples/auto_examples_jupyter.zip
+++ b/docs/source/auto_examples/auto_examples_jupyter.zip
Binary files differ
diff --git a/docs/source/auto_examples/auto_examples_python.zip b/docs/source/auto_examples/auto_examples_python.zip
index 6a8e449..92adf10 100644
--- a/docs/source/auto_examples/auto_examples_python.zip
+++ b/docs/source/auto_examples/auto_examples_python.zip
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_001.png b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_001.png
index 172d736..ba50e23 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_001.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_001.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_002.png b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_002.png
index 3043a72..19978ff 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_002.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_002.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_005.png b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_005.png
index 5565d75..aed13b2 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_005.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_005.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_006.png b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_006.png
index 06d1020..8ea40f1 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_006.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_006.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_009.png b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_009.png
index 8c16aea..404e9d8 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_009.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_009.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_010.png b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_010.png
index ccfe1e0..56b79cf 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_010.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_OT_2D_samples_010.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_WDA_001.png b/docs/source/auto_examples/images/sphx_glr_plot_WDA_001.png
index 9048051..f724332 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_WDA_001.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_WDA_001.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_WDA_003.png b/docs/source/auto_examples/images/sphx_glr_plot_WDA_003.png
index fcf13c6..b231020 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_WDA_003.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_WDA_003.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_001.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_001.png
index a28f245..bedc950 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_001.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_001.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_003.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_003.png
index 4d0b12d..8e3ccad 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_003.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_classes_003.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_001.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_001.png
index 9e78aed..3d6a740 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_001.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_001.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_003.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_003.png
index d37359b..aa16585 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_003.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_003.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_006.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_006.png
index c71284a..5dc3ba7 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_006.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_d2_006.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_001.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_001.png
index d2ee139..4239465 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_001.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_001.png
Binary files differ
diff --git a/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_003.png b/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_003.png
index fa1ab81..620105e 100644
--- a/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_003.png
+++ b/docs/source/auto_examples/images/sphx_glr_plot_otda_mapping_003.png
Binary files differ
diff --git a/docs/source/auto_examples/images/thumb/sphx_glr_plot_OT_2D_samples_thumb.png b/docs/source/auto_examples/images/thumb/sphx_glr_plot_OT_2D_samples_thumb.png
index 1f42900..dbb5cfd 100644
--- a/docs/source/auto_examples/images/thumb/sphx_glr_plot_OT_2D_samples_thumb.png
+++ b/docs/source/auto_examples/images/thumb/sphx_glr_plot_OT_2D_samples_thumb.png
Binary files differ
diff --git a/docs/source/auto_examples/images/thumb/sphx_glr_plot_WDA_thumb.png b/docs/source/auto_examples/images/thumb/sphx_glr_plot_WDA_thumb.png
index 8db78a1..f55490c 100644
--- a/docs/source/auto_examples/images/thumb/sphx_glr_plot_WDA_thumb.png
+++ b/docs/source/auto_examples/images/thumb/sphx_glr_plot_WDA_thumb.png
Binary files differ
diff --git a/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_classes_thumb.png b/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_classes_thumb.png
index a2571a5..a72fe37 100644
--- a/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_classes_thumb.png
+++ b/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_classes_thumb.png
Binary files differ
diff --git a/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_d2_thumb.png b/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_d2_thumb.png
index 6c8f37f..cddf768 100644
--- a/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_d2_thumb.png
+++ b/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_d2_thumb.png
Binary files differ
diff --git a/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_mapping_thumb.png b/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_mapping_thumb.png
index a042411..959cc44 100644
--- a/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_mapping_thumb.png
+++ b/docs/source/auto_examples/images/thumb/sphx_glr_plot_otda_mapping_thumb.png
Binary files differ
diff --git a/docs/source/auto_examples/plot_OT_1D.ipynb b/docs/source/auto_examples/plot_OT_1D.ipynb
index c8925ac..26748c2 100644
--- a/docs/source/auto_examples/plot_OT_1D.ipynb
+++ b/docs/source/auto_examples/plot_OT_1D.ipynb
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot distributions and loss matrix\n##################################\n\n"
+ "Plot distributions and loss matrix\n----------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Solve EMD\n#############################################################################\n\n"
+ "Solve EMD\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Solve Sinkhorn\n#############################################################################\n\n"
+ "Solve Sinkhorn\n--------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_OT_1D.py b/docs/source/auto_examples/plot_OT_1D.py
index 36f823f..719058f 100644
--- a/docs/source/auto_examples/plot_OT_1D.py
+++ b/docs/source/auto_examples/plot_OT_1D.py
@@ -41,7 +41,7 @@ M /= M.max()
##############################################################################
# Plot distributions and loss matrix
-###################################
+# ----------------------------------
#%% plot the distributions
@@ -57,7 +57,8 @@ ot.plot.plot1D_mat(a, b, M, 'Cost matrix M')
##############################################################################
# Solve EMD
-##############################################################################
+# ---------
+
#%% EMD
@@ -68,7 +69,8 @@ ot.plot.plot1D_mat(a, b, G0, 'OT matrix G0')
##############################################################################
# Solve Sinkhorn
-##############################################################################
+# --------------
+
#%% Sinkhorn
diff --git a/docs/source/auto_examples/plot_OT_1D.rst b/docs/source/auto_examples/plot_OT_1D.rst
index 32a88e7..b91916e 100644
--- a/docs/source/auto_examples/plot_OT_1D.rst
+++ b/docs/source/auto_examples/plot_OT_1D.rst
@@ -63,7 +63,7 @@ Generate data
Plot distributions and loss matrix
-##################################
+----------------------------------
@@ -102,13 +102,14 @@ Plot distributions and loss matrix
Solve EMD
-#############################################################################
+---------
.. code-block:: python
+
#%% EMD
G0 = ot.emd(a, b, M)
@@ -126,13 +127,14 @@ Solve EMD
Solve Sinkhorn
-#############################################################################
+--------------
.. code-block:: python
+
#%% Sinkhorn
lambd = 1e-3
@@ -169,7 +171,7 @@ Solve Sinkhorn
110|1.527180e-10|
-**Total running time of the script:** ( 0 minutes 0.754 seconds)
+**Total running time of the script:** ( 0 minutes 0.748 seconds)
diff --git a/docs/source/auto_examples/plot_OT_2D_samples.ipynb b/docs/source/auto_examples/plot_OT_2D_samples.ipynb
index 0ed7367..41a37f3 100644
--- a/docs/source/auto_examples/plot_OT_2D_samples.ipynb
+++ b/docs/source/auto_examples/plot_OT_2D_samples.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot data\n#############################################################################\n\n"
+ "Plot data\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Compute EMD\n#############################################################################\n\n"
+ "Compute EMD\n-----------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Compute Sinkhorn\n#############################################################################\n\n"
+ "Compute Sinkhorn\n----------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_OT_2D_samples.py b/docs/source/auto_examples/plot_OT_2D_samples.py
index f57d631..9818ec5 100644
--- a/docs/source/auto_examples/plot_OT_2D_samples.py
+++ b/docs/source/auto_examples/plot_OT_2D_samples.py
@@ -19,7 +19,7 @@ import ot
##############################################################################
# Generate data
-##############################################################################
+# -------------
#%% parameters and data generation
@@ -42,7 +42,7 @@ M /= M.max()
##############################################################################
# Plot data
-##############################################################################
+# ---------
#%% plot samples
@@ -58,7 +58,7 @@ pl.title('Cost matrix M')
##############################################################################
# Compute EMD
-##############################################################################
+# -----------
#%% EMD
@@ -78,7 +78,7 @@ pl.title('OT matrix with samples')
##############################################################################
# Compute Sinkhorn
-##############################################################################
+# ----------------
#%% sinkhorn
diff --git a/docs/source/auto_examples/plot_OT_2D_samples.rst b/docs/source/auto_examples/plot_OT_2D_samples.rst
index f95ffaf..0ad9cf0 100644
--- a/docs/source/auto_examples/plot_OT_2D_samples.rst
+++ b/docs/source/auto_examples/plot_OT_2D_samples.rst
@@ -31,7 +31,7 @@ sum of diracs. The OT matrix is plotted with the samples.
Generate data
-#############################################################################
+-------------
@@ -64,7 +64,7 @@ Generate data
Plot data
-#############################################################################
+---------
@@ -103,7 +103,7 @@ Plot data
Compute EMD
-#############################################################################
+-----------
@@ -146,7 +146,7 @@ Compute EMD
Compute Sinkhorn
-#############################################################################
+----------------
@@ -191,7 +191,7 @@ Compute Sinkhorn
-**Total running time of the script:** ( 0 minutes 1.990 seconds)
+**Total running time of the script:** ( 0 minutes 1.743 seconds)
diff --git a/docs/source/auto_examples/plot_OT_L1_vs_L2.ipynb b/docs/source/auto_examples/plot_OT_L1_vs_L2.ipynb
index e738db7..2b9a364 100644
--- a/docs/source/auto_examples/plot_OT_L1_vs_L2.ipynb
+++ b/docs/source/auto_examples/plot_OT_L1_vs_L2.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Dataset 1 : uniform sampling\n#############################################################################\n\n"
+ "Dataset 1 : uniform sampling\n----------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Dataset 1 : Plot OT Matrices\n#############################################################################\n\n"
+ "Dataset 1 : Plot OT Matrices\n----------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Dataset 2 : Partial circle\n#############################################################################\n\n"
+ "Dataset 2 : Partial circle\n--------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Dataset 2 : Plot OT Matrices\n#############################################################################\n\n"
+ "Dataset 2 : Plot OT Matrices\n-----------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_OT_L1_vs_L2.py b/docs/source/auto_examples/plot_OT_L1_vs_L2.py
index 49d37e1..090e809 100644
--- a/docs/source/auto_examples/plot_OT_L1_vs_L2.py
+++ b/docs/source/auto_examples/plot_OT_L1_vs_L2.py
@@ -22,7 +22,7 @@ import ot
##############################################################################
# Dataset 1 : uniform sampling
-##############################################################################
+# ----------------------------
n = 20 # nb samples
xs = np.zeros((n, 2))
@@ -73,7 +73,7 @@ pl.tight_layout()
##############################################################################
# Dataset 1 : Plot OT Matrices
-##############################################################################
+# ----------------------------
#%% EMD
@@ -114,7 +114,7 @@ pl.show()
##############################################################################
# Dataset 2 : Partial circle
-##############################################################################
+# --------------------------
n = 50 # nb samples
xtot = np.zeros((n + 1, 2))
@@ -168,7 +168,7 @@ pl.tight_layout()
##############################################################################
# Dataset 2 : Plot OT Matrices
-##############################################################################
+# -----------------------------
#%% EMD
diff --git a/docs/source/auto_examples/plot_OT_L1_vs_L2.rst b/docs/source/auto_examples/plot_OT_L1_vs_L2.rst
index 8b5b133..f97b373 100644
--- a/docs/source/auto_examples/plot_OT_L1_vs_L2.rst
+++ b/docs/source/auto_examples/plot_OT_L1_vs_L2.rst
@@ -34,7 +34,7 @@ https://arxiv.org/pdf/1706.07650.pdf
Dataset 1 : uniform sampling
-#############################################################################
+----------------------------
@@ -108,7 +108,7 @@ Dataset 1 : uniform sampling
Dataset 1 : Plot OT Matrices
-#############################################################################
+----------------------------
@@ -162,7 +162,7 @@ Dataset 1 : Plot OT Matrices
Dataset 2 : Partial circle
-#############################################################################
+--------------------------
@@ -239,7 +239,7 @@ Dataset 2 : Partial circle
Dataset 2 : Plot OT Matrices
-#############################################################################
+-----------------------------
@@ -290,7 +290,7 @@ Dataset 2 : Plot OT Matrices
-**Total running time of the script:** ( 0 minutes 1.218 seconds)
+**Total running time of the script:** ( 0 minutes 1.134 seconds)
diff --git a/docs/source/auto_examples/plot_WDA.ipynb b/docs/source/auto_examples/plot_WDA.ipynb
index 47a6eca..1661c53 100644
--- a/docs/source/auto_examples/plot_WDA.ipynb
+++ b/docs/source/auto_examples/plot_WDA.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot data\n#############################################################################\n\n"
+ "Plot data\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Compute Fisher Discriminant Analysis\n#############################################################################\n\n"
+ "Compute Fisher Discriminant Analysis\n------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Compute Wasserstein Discriminant Analysis\n#############################################################################\n\n"
+ "Compute Wasserstein Discriminant Analysis\n-----------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -105,7 +105,7 @@
},
{
"source": [
- "Plot 2D projections\n#############################################################################\n\n"
+ "Plot 2D projections\n-------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_WDA.py b/docs/source/auto_examples/plot_WDA.py
index 5928621..93cc237 100644
--- a/docs/source/auto_examples/plot_WDA.py
+++ b/docs/source/auto_examples/plot_WDA.py
@@ -24,7 +24,7 @@ from ot.dr import wda, fda
##############################################################################
# Generate data
-##############################################################################
+# -------------
#%% parameters
@@ -51,7 +51,7 @@ xt = np.hstack((xt, np.random.randn(n, nbnoise)))
##############################################################################
# Plot data
-##############################################################################
+# ---------
#%% plot samples
pl.figure(1, figsize=(6.4, 3.5))
@@ -69,7 +69,7 @@ pl.tight_layout()
##############################################################################
# Compute Fisher Discriminant Analysis
-##############################################################################
+# ------------------------------------
#%% Compute FDA
p = 2
@@ -78,7 +78,7 @@ Pfda, projfda = fda(xs, ys, p)
##############################################################################
# Compute Wasserstein Discriminant Analysis
-##############################################################################
+# -----------------------------------------
#%% Compute WDA
p = 2
@@ -91,7 +91,7 @@ Pwda, projwda = wda(xs, ys, p, reg, k, maxiter=maxiter)
##############################################################################
# Plot 2D projections
-##############################################################################
+# -------------------
#%% plot samples
diff --git a/docs/source/auto_examples/plot_WDA.rst b/docs/source/auto_examples/plot_WDA.rst
index a0c3389..64ddb47 100644
--- a/docs/source/auto_examples/plot_WDA.rst
+++ b/docs/source/auto_examples/plot_WDA.rst
@@ -36,7 +36,7 @@ Wasserstein Discriminant Analysis.
Generate data
-#############################################################################
+-------------
@@ -73,7 +73,7 @@ Generate data
Plot data
-#############################################################################
+---------
@@ -104,7 +104,7 @@ Plot data
Compute Fisher Discriminant Analysis
-#############################################################################
+------------------------------------
@@ -123,7 +123,7 @@ Compute Fisher Discriminant Analysis
Compute Wasserstein Discriminant Analysis
-#############################################################################
+-----------------------------------------
@@ -150,65 +150,25 @@ Compute Wasserstein Discriminant Analysis
Compiling cost function...
Computing gradient of cost function...
iter cost val grad. norm
- 1 +8.6305817354868675e-01 4.10110152e-01
- 2 +4.6939060757969131e-01 2.98553763e-01
- 3 +4.2106314200107775e-01 1.48552668e-01
- 4 +4.1376389458568069e-01 1.12319011e-01
- 5 +4.0984854988792835e-01 1.01126129e-01
- 6 +4.0415292614140025e-01 3.90875165e-02
- 7 +4.0297967887432584e-01 2.73716014e-02
- 8 +4.0252319029045258e-01 3.76498956e-02
- 9 +4.0158635935184972e-01 1.31986577e-02
- 10 +4.0118906894272482e-01 3.40307273e-02
- 11 +4.0052579694802176e-01 7.79567347e-03
- 12 +4.0049330810825384e-01 9.77921941e-03
- 13 +4.0042500151972926e-01 4.63602913e-03
- 14 +4.0031705300038767e-01 1.69742018e-02
- 15 +4.0013705338124350e-01 7.40310798e-03
- 16 +4.0006224569843946e-01 1.08829949e-02
- 17 +3.9998280287782945e-01 1.25733450e-02
- 18 +3.9986405111843215e-01 1.05626807e-02
- 19 +3.9974905002724365e-01 9.93566406e-03
- 20 +3.9971323753531823e-01 2.21199533e-02
- 21 +3.9958582328238779e-01 1.73335808e-02
- 22 +3.9937139582811110e-01 1.09182412e-02
- 23 +3.9923748818499571e-01 1.77304913e-02
- 24 +3.9900530515251881e-01 1.15381586e-02
- 25 +3.9883316307006128e-01 1.80225446e-02
- 26 +3.9860317631835845e-01 1.65011032e-02
- 27 +3.9852130309759393e-01 2.81245689e-02
- 28 +3.9824281033694675e-01 2.01114810e-02
- 29 +3.9799657608114836e-01 2.66040929e-02
- 30 +3.9746233677210713e-01 1.45779937e-02
- 31 +3.9671794378467928e-01 4.27487207e-02
- 32 +3.9573357685391913e-01 2.20071520e-02
- 33 +3.9536725156297214e-01 2.00817458e-02
- 34 +3.9515994339814914e-01 3.81472315e-02
- 35 +3.9448966390371887e-01 2.52129049e-02
- 36 +3.9351423238681266e-01 5.60677866e-02
- 37 +3.9082703288308568e-01 4.26859586e-02
- 38 +3.7139409489868136e-01 1.26067835e-01
- 39 +2.8085932518253526e-01 1.70133509e-01
- 40 +2.7330384726281814e-01 1.95523507e-01
- 41 +2.4806985554269162e-01 1.31192016e-01
- 42 +2.3748356968454920e-01 8.71616829e-02
- 43 +2.3501927152342389e-01 7.02789537e-02
- 44 +2.3183578112546338e-01 2.62025296e-02
- 45 +2.3154208568082749e-01 1.67845346e-02
- 46 +2.3139316710346300e-01 8.27285074e-03
- 47 +2.3136034106523354e-01 4.64818210e-03
- 48 +2.3134548827742521e-01 4.53144806e-04
- 49 +2.3134540503271503e-01 2.91010390e-04
- 50 +2.3134535764073319e-01 1.25662481e-04
- 51 +2.3134534692621381e-01 1.24751216e-05
- 52 +2.3134534685831357e-01 7.44008265e-06
- 53 +2.3134534684658337e-01 6.16933546e-06
- 54 +2.3134534682129679e-01 5.12152219e-07
- Terminated - min grad norm reached after 54 iterations, 24.53 seconds.
+ 1 +5.4993226050368416e-01 5.18285173e-01
+ 2 +3.4883000507542844e-01 1.96795818e-01
+ 3 +2.9841234004693890e-01 2.33029475e-01
+ 4 +2.3976476757548179e-01 1.38593951e-01
+ 5 +2.3614468346177828e-01 1.19615394e-01
+ 6 +2.2586536502789240e-01 4.82430685e-02
+ 7 +2.2451030967794622e-01 2.56564039e-02
+ 8 +2.2421446331083625e-01 1.47932578e-02
+ 9 +2.2407441444450052e-01 1.12040327e-03
+ 10 +2.2407365923337522e-01 3.78899763e-04
+ 11 +2.2407356874011675e-01 1.79740810e-05
+ 12 +2.2407356862959993e-01 1.25643005e-05
+ 13 +2.2407356853043561e-01 1.40415001e-06
+ 14 +2.2407356852925220e-01 3.41183585e-07
+ Terminated - min grad norm reached after 14 iterations, 6.78 seconds.
Plot 2D projections
-#############################################################################
+-------------------
@@ -256,7 +216,7 @@ Plot 2D projections
-**Total running time of the script:** ( 0 minutes 25.326 seconds)
+**Total running time of the script:** ( 0 minutes 7.637 seconds)
diff --git a/docs/source/auto_examples/plot_barycenter_1D.ipynb b/docs/source/auto_examples/plot_barycenter_1D.ipynb
index 32cb2ec..a19e0fd 100644
--- a/docs/source/auto_examples/plot_barycenter_1D.ipynb
+++ b/docs/source/auto_examples/plot_barycenter_1D.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot data\n#############################################################################\n\n"
+ "Plot data\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Barycenter computation\n#############################################################################\n\n"
+ "Barycenter computation\n----------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Barycentric interpolation\n#############################################################################\n\n"
+ "Barycentric interpolation\n-------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_barycenter_1D.py b/docs/source/auto_examples/plot_barycenter_1D.py
index eef8536..620936b 100644
--- a/docs/source/auto_examples/plot_barycenter_1D.py
+++ b/docs/source/auto_examples/plot_barycenter_1D.py
@@ -27,7 +27,7 @@ from matplotlib.collections import PolyCollection
##############################################################################
# Generate data
-##############################################################################
+# -------------
#%% parameters
@@ -50,7 +50,7 @@ M /= M.max()
##############################################################################
# Plot data
-##############################################################################
+# ---------
#%% plot the distributions
@@ -62,7 +62,7 @@ pl.tight_layout()
##############################################################################
# Barycenter computation
-##############################################################################
+# ----------------------
#%% barycenter computation
@@ -92,7 +92,7 @@ pl.tight_layout()
##############################################################################
# Barycentric interpolation
-##############################################################################
+# -------------------------
#%% barycenter interpolation
diff --git a/docs/source/auto_examples/plot_barycenter_1D.rst b/docs/source/auto_examples/plot_barycenter_1D.rst
index b1794cd..413fae3 100644
--- a/docs/source/auto_examples/plot_barycenter_1D.rst
+++ b/docs/source/auto_examples/plot_barycenter_1D.rst
@@ -39,7 +39,7 @@ SIAM Journal on Scientific Computing, 37(2), A1111-A1138.
Generate data
-#############################################################################
+-------------
@@ -72,7 +72,7 @@ Generate data
Plot data
-#############################################################################
+---------
@@ -97,7 +97,7 @@ Plot data
Barycenter computation
-#############################################################################
+----------------------
@@ -140,7 +140,7 @@ Barycenter computation
Barycentric interpolation
-#############################################################################
+-------------------------
@@ -230,7 +230,7 @@ Barycentric interpolation
-**Total running time of the script:** ( 0 minutes 0.416 seconds)
+**Total running time of the script:** ( 0 minutes 0.431 seconds)
diff --git a/docs/source/auto_examples/plot_compute_emd.ipynb b/docs/source/auto_examples/plot_compute_emd.ipynb
index a882bd1..b9b8bc5 100644
--- a/docs/source/auto_examples/plot_compute_emd.ipynb
+++ b/docs/source/auto_examples/plot_compute_emd.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot data\n#############################################################################\n\n"
+ "Plot data\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Compute EMD for the different losses\n#############################################################################\n\n"
+ "Compute EMD for the different losses\n------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Compute Sinkhorn for the different losses\n#############################################################################\n\n"
+ "Compute Sinkhorn for the different losses\n-----------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_compute_emd.py b/docs/source/auto_examples/plot_compute_emd.py
index a84b249..73b42c3 100644
--- a/docs/source/auto_examples/plot_compute_emd.py
+++ b/docs/source/auto_examples/plot_compute_emd.py
@@ -22,7 +22,7 @@ from ot.datasets import get_1D_gauss as gauss
##############################################################################
# Generate data
-##############################################################################
+# -------------
#%% parameters
@@ -51,7 +51,7 @@ M2 /= M2.max()
##############################################################################
# Plot data
-##############################################################################
+# ---------
#%% plot the distributions
@@ -67,7 +67,7 @@ pl.tight_layout()
##############################################################################
# Compute EMD for the different losses
-##############################################################################
+# ------------------------------------
#%% Compute and plot distributions and loss matrix
@@ -83,7 +83,7 @@ pl.legend()
##############################################################################
# Compute Sinkhorn for the different losses
-##############################################################################
+# -----------------------------------------
#%%
reg = 1e-2
diff --git a/docs/source/auto_examples/plot_compute_emd.rst b/docs/source/auto_examples/plot_compute_emd.rst
index 58220a4..ce79e20 100644
--- a/docs/source/auto_examples/plot_compute_emd.rst
+++ b/docs/source/auto_examples/plot_compute_emd.rst
@@ -34,7 +34,7 @@ ground metrics and plot their values for diffeent distributions.
Generate data
-#############################################################################
+-------------
@@ -73,7 +73,7 @@ Generate data
Plot data
-#############################################################################
+---------
@@ -102,7 +102,7 @@ Plot data
Compute EMD for the different losses
-#############################################################################
+------------------------------------
@@ -131,7 +131,7 @@ Compute EMD for the different losses
Compute Sinkhorn for the different losses
-#############################################################################
+-----------------------------------------
@@ -162,7 +162,7 @@ Compute Sinkhorn for the different losses
-**Total running time of the script:** ( 0 minutes 0.471 seconds)
+**Total running time of the script:** ( 0 minutes 0.441 seconds)
diff --git a/docs/source/auto_examples/plot_optim_OTreg.ipynb b/docs/source/auto_examples/plot_optim_OTreg.ipynb
index f9fec33..333331b 100644
--- a/docs/source/auto_examples/plot_optim_OTreg.ipynb
+++ b/docs/source/auto_examples/plot_optim_OTreg.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Solve EMD\n#############################################################################\n\n"
+ "Solve EMD\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Solve EMD with Frobenius norm regularization\n#############################################################################\n\n"
+ "Solve EMD with Frobenius norm regularization\n--------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Solve EMD with entropic regularization\n#############################################################################\n\n"
+ "Solve EMD with entropic regularization\n--------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -105,7 +105,7 @@
},
{
"source": [
- "Solve EMD with Frobenius norm + entropic regularization\n#############################################################################\n\n"
+ "Solve EMD with Frobenius norm + entropic regularization\n-------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_optim_OTreg.py b/docs/source/auto_examples/plot_optim_OTreg.py
index d753414..e1a737e 100644
--- a/docs/source/auto_examples/plot_optim_OTreg.py
+++ b/docs/source/auto_examples/plot_optim_OTreg.py
@@ -32,7 +32,7 @@ import ot
##############################################################################
# Generate data
-##############################################################################
+# -------------
#%% parameters
@@ -51,7 +51,7 @@ M /= M.max()
##############################################################################
# Solve EMD
-##############################################################################
+# ---------
#%% EMD
@@ -62,7 +62,7 @@ ot.plot.plot1D_mat(a, b, G0, 'OT matrix G0')
##############################################################################
# Solve EMD with Frobenius norm regularization
-##############################################################################
+# --------------------------------------------
#%% Example with Frobenius norm regularization
@@ -84,7 +84,7 @@ ot.plot.plot1D_mat(a, b, Gl2, 'OT matrix Frob. reg')
##############################################################################
# Solve EMD with entropic regularization
-##############################################################################
+# --------------------------------------
#%% Example with entropic regularization
@@ -106,7 +106,7 @@ ot.plot.plot1D_mat(a, b, Ge, 'OT matrix Entrop. reg')
##############################################################################
# Solve EMD with Frobenius norm + entropic regularization
-##############################################################################
+# -------------------------------------------------------
#%% Example with Frobenius norm + entropic regularization with gcg
diff --git a/docs/source/auto_examples/plot_optim_OTreg.rst b/docs/source/auto_examples/plot_optim_OTreg.rst
index c3ec03b..f628024 100644
--- a/docs/source/auto_examples/plot_optim_OTreg.rst
+++ b/docs/source/auto_examples/plot_optim_OTreg.rst
@@ -44,7 +44,7 @@ arXiv preprint arXiv:1510.06567.
Generate data
-#############################################################################
+-------------
@@ -73,7 +73,7 @@ Generate data
Solve EMD
-#############################################################################
+---------
@@ -97,7 +97,7 @@ Solve EMD
Solve EMD with Frobenius norm regularization
-#############################################################################
+--------------------------------------------
@@ -359,7 +359,7 @@ Solve EMD with Frobenius norm regularization
Solve EMD with entropic regularization
-#############################################################################
+--------------------------------------
@@ -621,7 +621,7 @@ Solve EMD with entropic regularization
Solve EMD with Frobenius norm + entropic regularization
-#############################################################################
+-------------------------------------------------------
@@ -667,7 +667,7 @@ Solve EMD with Frobenius norm + entropic regularization
4|1.609284e-01|-1.111407e-12
-**Total running time of the script:** ( 0 minutes 1.913 seconds)
+**Total running time of the script:** ( 0 minutes 1.809 seconds)
diff --git a/docs/source/auto_examples/plot_otda_classes.ipynb b/docs/source/auto_examples/plot_otda_classes.ipynb
index 16634b1..6754fa5 100644
--- a/docs/source/auto_examples/plot_otda_classes.ipynb
+++ b/docs/source/auto_examples/plot_otda_classes.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Instantiate the different transport algorithms and fit them\n#############################################################################\n\n"
+ "Instantiate the different transport algorithms and fit them\n-----------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Fig 1 : plots source and target samples\n#############################################################################\n\n"
+ "Fig 1 : plots source and target samples\n---------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Fig 2 : plot optimal couplings and transported samples\n#############################################################################\n\n"
+ "Fig 2 : plot optimal couplings and transported samples\n------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_otda_classes.py b/docs/source/auto_examples/plot_otda_classes.py
index ec57a37..b14c11a 100644
--- a/docs/source/auto_examples/plot_otda_classes.py
+++ b/docs/source/auto_examples/plot_otda_classes.py
@@ -19,8 +19,8 @@ import ot
##############################################################################
-# generate data
-##############################################################################
+# Generate data
+# -------------
n_source_samples = 150
n_target_samples = 150
@@ -31,7 +31,7 @@ Xt, yt = ot.datasets.get_data_classif('3gauss2', n_target_samples)
##############################################################################
# Instantiate the different transport algorithms and fit them
-##############################################################################
+# -----------------------------------------------------------
# EMD Transport
ot_emd = ot.da.EMDTransport()
@@ -59,7 +59,7 @@ transp_Xs_l1l2 = ot_l1l2.transform(Xs=Xs)
##############################################################################
# Fig 1 : plots source and target samples
-##############################################################################
+# ---------------------------------------
pl.figure(1, figsize=(10, 5))
pl.subplot(1, 2, 1)
@@ -80,7 +80,7 @@ pl.tight_layout()
##############################################################################
# Fig 2 : plot optimal couplings and transported samples
-##############################################################################
+# ------------------------------------------------------
param_img = {'interpolation': 'nearest', 'cmap': 'spectral'}
diff --git a/docs/source/auto_examples/plot_otda_classes.rst b/docs/source/auto_examples/plot_otda_classes.rst
index d1a13b1..f19a99f 100644
--- a/docs/source/auto_examples/plot_otda_classes.rst
+++ b/docs/source/auto_examples/plot_otda_classes.rst
@@ -31,8 +31,8 @@ approaches currently supported in POT.
-generate data
-#############################################################################
+Generate data
+-------------
@@ -53,7 +53,7 @@ generate data
Instantiate the different transport algorithms and fit them
-#############################################################################
+-----------------------------------------------------------
@@ -94,33 +94,33 @@ Instantiate the different transport algorithms and fit them
It. |Loss |Delta loss
--------------------------------
- 0|9.984935e+00|0.000000e+00
- 1|2.126803e+00|-3.694808e+00
- 2|1.867272e+00|-1.389895e-01
- 3|1.803858e+00|-3.515488e-02
- 4|1.783036e+00|-1.167761e-02
- 5|1.774823e+00|-4.627422e-03
- 6|1.771947e+00|-1.623526e-03
- 7|1.767564e+00|-2.479535e-03
- 8|1.763484e+00|-2.313667e-03
- 9|1.761138e+00|-1.331780e-03
- 10|1.758879e+00|-1.284576e-03
- 11|1.758034e+00|-4.806014e-04
- 12|1.757595e+00|-2.497155e-04
- 13|1.756749e+00|-4.818562e-04
- 14|1.755316e+00|-8.161432e-04
- 15|1.754988e+00|-1.866236e-04
- 16|1.754964e+00|-1.382474e-05
- 17|1.754032e+00|-5.315971e-04
- 18|1.753595e+00|-2.492359e-04
- 19|1.752900e+00|-3.961403e-04
+ 0|9.552437e+00|0.000000e+00
+ 1|1.921833e+00|-3.970483e+00
+ 2|1.671022e+00|-1.500942e-01
+ 3|1.615147e+00|-3.459458e-02
+ 4|1.594289e+00|-1.308252e-02
+ 5|1.587287e+00|-4.411254e-03
+ 6|1.581665e+00|-3.554702e-03
+ 7|1.577022e+00|-2.943809e-03
+ 8|1.573870e+00|-2.002870e-03
+ 9|1.571645e+00|-1.415696e-03
+ 10|1.569342e+00|-1.467590e-03
+ 11|1.567863e+00|-9.432233e-04
+ 12|1.566558e+00|-8.329769e-04
+ 13|1.565414e+00|-7.311320e-04
+ 14|1.564425e+00|-6.319985e-04
+ 15|1.563955e+00|-3.007604e-04
+ 16|1.563658e+00|-1.894627e-04
+ 17|1.562886e+00|-4.941143e-04
+ 18|1.562578e+00|-1.974031e-04
+ 19|1.562445e+00|-8.468825e-05
It. |Loss |Delta loss
--------------------------------
- 20|1.752850e+00|-2.869262e-05
+ 20|1.562007e+00|-2.805136e-04
Fig 1 : plots source and target samples
-#############################################################################
+---------------------------------------
@@ -154,7 +154,7 @@ Fig 1 : plots source and target samples
Fig 2 : plot optimal couplings and transported samples
-#############################################################################
+------------------------------------------------------
@@ -236,7 +236,7 @@ Fig 2 : plot optimal couplings and transported samples
-**Total running time of the script:** ( 0 minutes 1.576 seconds)
+**Total running time of the script:** ( 0 minutes 1.596 seconds)
diff --git a/docs/source/auto_examples/plot_otda_color_images.ipynb b/docs/source/auto_examples/plot_otda_color_images.ipynb
index 797b27d..2daf406 100644
--- a/docs/source/auto_examples/plot_otda_color_images.ipynb
+++ b/docs/source/auto_examples/plot_otda_color_images.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot original image\n#############################################################################\n\n"
+ "Plot original image\n-------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Scatter plot of colors\n#############################################################################\n\n"
+ "Scatter plot of colors\n----------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Instantiate the different transport algorithms and fit them\n#############################################################################\n\n"
+ "Instantiate the different transport algorithms and fit them\n-----------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -105,7 +105,7 @@
},
{
"source": [
- "Plot new images\n#############################################################################\n\n"
+ "Plot new images\n---------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_otda_color_images.py b/docs/source/auto_examples/plot_otda_color_images.py
index f1df9d9..e77aec0 100644
--- a/docs/source/auto_examples/plot_otda_color_images.py
+++ b/docs/source/auto_examples/plot_otda_color_images.py
@@ -42,7 +42,7 @@ def minmax(I):
##############################################################################
# Generate data
-##############################################################################
+# -------------
# Loading images
I1 = ndimage.imread('../data/ocean_day.jpg').astype(np.float64) / 256
@@ -62,7 +62,7 @@ Xt = X2[idx2, :]
##############################################################################
# Plot original image
-##############################################################################
+# -------------------
pl.figure(1, figsize=(6.4, 3))
@@ -79,7 +79,7 @@ pl.title('Image 2')
##############################################################################
# Scatter plot of colors
-##############################################################################
+# ----------------------
pl.figure(2, figsize=(6.4, 3))
@@ -101,7 +101,7 @@ pl.tight_layout()
##############################################################################
# Instantiate the different transport algorithms and fit them
-##############################################################################
+# -----------------------------------------------------------
# EMDTransport
ot_emd = ot.da.EMDTransport()
@@ -127,7 +127,7 @@ I2te = minmax(mat2im(transp_Xt_sinkhorn, I2.shape))
##############################################################################
# Plot new images
-##############################################################################
+# ---------------
pl.figure(3, figsize=(8, 4))
diff --git a/docs/source/auto_examples/plot_otda_color_images.rst b/docs/source/auto_examples/plot_otda_color_images.rst
index 88e93d2..4772bed 100644
--- a/docs/source/auto_examples/plot_otda_color_images.rst
+++ b/docs/source/auto_examples/plot_otda_color_images.rst
@@ -54,7 +54,7 @@ SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
Generate data
-#############################################################################
+-------------
@@ -84,7 +84,7 @@ Generate data
Plot original image
-#############################################################################
+-------------------
@@ -114,7 +114,7 @@ Plot original image
Scatter plot of colors
-#############################################################################
+----------------------
@@ -149,7 +149,7 @@ Scatter plot of colors
Instantiate the different transport algorithms and fit them
-#############################################################################
+-----------------------------------------------------------
@@ -185,7 +185,7 @@ Instantiate the different transport algorithms and fit them
Plot new images
-#############################################################################
+---------------
@@ -235,7 +235,7 @@ Plot new images
-**Total running time of the script:** ( 2 minutes 28.053 seconds)
+**Total running time of the script:** ( 2 minutes 24.561 seconds)
diff --git a/docs/source/auto_examples/plot_otda_d2.ipynb b/docs/source/auto_examples/plot_otda_d2.ipynb
index 2331f8c..7bfcc9a 100644
--- a/docs/source/auto_examples/plot_otda_d2.ipynb
+++ b/docs/source/auto_examples/plot_otda_d2.ipynb
@@ -15,7 +15,7 @@
},
{
"source": [
- "\n# OT for empirical distributions\n\n\nThis example introduces a domain adaptation in a 2D setting. It explicits\nthe problem of domain adaptation and introduces some optimal transport\napproaches to solve it.\n\nQuantities such as optimal couplings, greater coupling coefficients and\ntransported samples are represented in order to give a visual understanding\nof what the transport methods are doing.\n\n"
+ "\n# OT for domain adaptation on empirical distributions\n\n\nThis example introduces a domain adaptation in a 2D setting. It explicits\nthe problem of domain adaptation and introduces some optimal transport\napproaches to solve it.\n\nQuantities such as optimal couplings, greater coupling coefficients and\ntransported samples are represented in order to give a visual understanding\nof what the transport methods are doing.\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -33,7 +33,7 @@
},
{
"source": [
- "generate data\n#############################################################################\n\n"
+ "generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Instantiate the different transport algorithms and fit them\n#############################################################################\n\n"
+ "Instantiate the different transport algorithms and fit them\n-----------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Fig 1 : plots source and target samples + matrix of pairwise distance\n#############################################################################\n\n"
+ "Fig 1 : plots source and target samples + matrix of pairwise distance\n---------------------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Fig 2 : plots optimal couplings for the different methods\n#############################################################################\n\n"
+ "Fig 2 : plots optimal couplings for the different methods\n---------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -105,7 +105,7 @@
},
{
"source": [
- "Fig 3 : plot transported samples\n#############################################################################\n\n"
+ "Fig 3 : plot transported samples\n--------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_otda_d2.py b/docs/source/auto_examples/plot_otda_d2.py
index 3daa0a6..e53d7d6 100644
--- a/docs/source/auto_examples/plot_otda_d2.py
+++ b/docs/source/auto_examples/plot_otda_d2.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-==============================
-OT for empirical distributions
-==============================
+===================================================
+OT for domain adaptation on empirical distributions
+===================================================
This example introduces a domain adaptation in a 2D setting. It explicits
the problem of domain adaptation and introduces some optimal transport
@@ -24,7 +24,7 @@ import ot
##############################################################################
# generate data
-##############################################################################
+# -------------
n_samples_source = 150
n_samples_target = 150
@@ -38,7 +38,7 @@ M = ot.dist(Xs, Xt, metric='sqeuclidean')
##############################################################################
# Instantiate the different transport algorithms and fit them
-##############################################################################
+# -----------------------------------------------------------
# EMD Transport
ot_emd = ot.da.EMDTransport()
@@ -60,7 +60,7 @@ transp_Xs_lpl1 = ot_lpl1.transform(Xs=Xs)
##############################################################################
# Fig 1 : plots source and target samples + matrix of pairwise distance
-##############################################################################
+# ---------------------------------------------------------------------
pl.figure(1, figsize=(10, 10))
pl.subplot(2, 2, 1)
@@ -87,8 +87,7 @@ pl.tight_layout()
##############################################################################
# Fig 2 : plots optimal couplings for the different methods
-##############################################################################
-
+# ---------------------------------------------------------
pl.figure(2, figsize=(10, 6))
pl.subplot(2, 3, 1)
@@ -137,7 +136,7 @@ pl.tight_layout()
##############################################################################
# Fig 3 : plot transported samples
-##############################################################################
+# --------------------------------
# display transported samples
pl.figure(4, figsize=(10, 4))
diff --git a/docs/source/auto_examples/plot_otda_d2.rst b/docs/source/auto_examples/plot_otda_d2.rst
index 3aa1149..2b716e1 100644
--- a/docs/source/auto_examples/plot_otda_d2.rst
+++ b/docs/source/auto_examples/plot_otda_d2.rst
@@ -3,9 +3,9 @@
.. _sphx_glr_auto_examples_plot_otda_d2.py:
-==============================
-OT for empirical distributions
-==============================
+===================================================
+OT for domain adaptation on empirical distributions
+===================================================
This example introduces a domain adaptation in a 2D setting. It explicits
the problem of domain adaptation and introduces some optimal transport
@@ -36,7 +36,7 @@ of what the transport methods are doing.
generate data
-#############################################################################
+-------------
@@ -60,7 +60,7 @@ generate data
Instantiate the different transport algorithms and fit them
-#############################################################################
+-----------------------------------------------------------
@@ -92,7 +92,7 @@ Instantiate the different transport algorithms and fit them
Fig 1 : plots source and target samples + matrix of pairwise distance
-#############################################################################
+---------------------------------------------------------------------
@@ -132,13 +132,12 @@ Fig 1 : plots source and target samples + matrix of pairwise distance
Fig 2 : plots optimal couplings for the different methods
-#############################################################################
+---------------------------------------------------------
.. code-block:: python
-
pl.figure(2, figsize=(10, 6))
pl.subplot(2, 3, 1)
@@ -195,7 +194,7 @@ Fig 2 : plots optimal couplings for the different methods
Fig 3 : plot transported samples
-#############################################################################
+--------------------------------
@@ -243,7 +242,7 @@ Fig 3 : plot transported samples
-**Total running time of the script:** ( 0 minutes 32.275 seconds)
+**Total running time of the script:** ( 0 minutes 32.084 seconds)
diff --git a/docs/source/auto_examples/plot_otda_mapping.ipynb b/docs/source/auto_examples/plot_otda_mapping.ipynb
index 5b3fd06..0374146 100644
--- a/docs/source/auto_examples/plot_otda_mapping.ipynb
+++ b/docs/source/auto_examples/plot_otda_mapping.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Plot data\n#############################################################################\n\n"
+ "Plot data\n---------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Instantiate the different transport algorithms and fit them\n#############################################################################\n\n"
+ "Instantiate the different transport algorithms and fit them\n-----------------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Plot transported samples\n#############################################################################\n\n"
+ "Plot transported samples\n------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_otda_mapping.py b/docs/source/auto_examples/plot_otda_mapping.py
index e78fef4..167c3a1 100644
--- a/docs/source/auto_examples/plot_otda_mapping.py
+++ b/docs/source/auto_examples/plot_otda_mapping.py
@@ -25,7 +25,7 @@ import ot
##############################################################################
# Generate data
-##############################################################################
+# -------------
n_source_samples = 100
n_target_samples = 100
@@ -45,7 +45,7 @@ Xt = Xt + 4
##############################################################################
# Plot data
-##############################################################################
+# ---------
pl.figure(1, (10, 5))
pl.clf()
@@ -57,7 +57,7 @@ pl.title('Source and target distributions')
##############################################################################
# Instantiate the different transport algorithms and fit them
-##############################################################################
+# -----------------------------------------------------------
# MappingTransport with linear kernel
ot_mapping_linear = ot.da.MappingTransport(
@@ -88,7 +88,7 @@ transp_Xs_gaussian_new = ot_mapping_gaussian.transform(Xs=Xs_new)
##############################################################################
# Plot transported samples
-##############################################################################
+# ------------------------
pl.figure(2)
pl.clf()
diff --git a/docs/source/auto_examples/plot_otda_mapping.rst b/docs/source/auto_examples/plot_otda_mapping.rst
index ddc1ee9..6c1c780 100644
--- a/docs/source/auto_examples/plot_otda_mapping.rst
+++ b/docs/source/auto_examples/plot_otda_mapping.rst
@@ -37,7 +37,7 @@ a linear or a kernelized mapping as introduced in [8].
Generate data
-#############################################################################
+-------------
@@ -67,7 +67,7 @@ Generate data
Plot data
-#############################################################################
+---------
@@ -92,7 +92,7 @@ Plot data
Instantiate the different transport algorithms and fit them
-#############################################################################
+-----------------------------------------------------------
@@ -136,30 +136,28 @@ Instantiate the different transport algorithms and fit them
It. |Loss |Delta loss
--------------------------------
- 0|4.481482e+03|0.000000e+00
- 1|4.469389e+03|-2.698549e-03
- 2|4.468825e+03|-1.261217e-04
- 3|4.468580e+03|-5.486064e-05
- 4|4.468438e+03|-3.161220e-05
- 5|4.468352e+03|-1.930800e-05
- 6|4.468309e+03|-9.570658e-06
+ 0|4.307233e+03|0.000000e+00
+ 1|4.296694e+03|-2.446759e-03
+ 2|4.296419e+03|-6.417421e-05
+ 3|4.296328e+03|-2.110209e-05
+ 4|4.296305e+03|-5.298603e-06
It. |Loss |Delta loss
--------------------------------
- 0|4.504654e+02|0.000000e+00
- 1|4.461571e+02|-9.564116e-03
- 2|4.459105e+02|-5.528043e-04
- 3|4.457895e+02|-2.712398e-04
- 4|4.457041e+02|-1.914829e-04
- 5|4.456431e+02|-1.369704e-04
- 6|4.456032e+02|-8.944784e-05
- 7|4.455700e+02|-7.447824e-05
- 8|4.455447e+02|-5.688965e-05
- 9|4.455229e+02|-4.890051e-05
- 10|4.455084e+02|-3.262490e-05
+ 0|4.325624e+02|0.000000e+00
+ 1|4.281958e+02|-1.009489e-02
+ 2|4.279370e+02|-6.042202e-04
+ 3|4.278109e+02|-2.947651e-04
+ 4|4.277212e+02|-2.096651e-04
+ 5|4.276589e+02|-1.456221e-04
+ 6|4.276141e+02|-1.048476e-04
+ 7|4.275803e+02|-7.906213e-05
+ 8|4.275531e+02|-6.360573e-05
+ 9|4.275314e+02|-5.076642e-05
+ 10|4.275129e+02|-4.325858e-05
Plot transported samples
-#############################################################################
+------------------------
@@ -208,7 +206,7 @@ Plot transported samples
-**Total running time of the script:** ( 0 minutes 0.869 seconds)
+**Total running time of the script:** ( 0 minutes 0.747 seconds)
diff --git a/docs/source/auto_examples/plot_otda_mapping_colors_images.ipynb b/docs/source/auto_examples/plot_otda_mapping_colors_images.ipynb
index 3b3987a..56caa8a 100644
--- a/docs/source/auto_examples/plot_otda_mapping_colors_images.ipynb
+++ b/docs/source/auto_examples/plot_otda_mapping_colors_images.ipynb
@@ -33,7 +33,7 @@
},
{
"source": [
- "Generate data\n#############################################################################\n\n"
+ "Generate data\n-------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -51,7 +51,7 @@
},
{
"source": [
- "Domain adaptation for pixel distribution transfer\n#############################################################################\n\n"
+ "Domain adaptation for pixel distribution transfer\n-------------------------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -69,7 +69,7 @@
},
{
"source": [
- "Plot original images\n#############################################################################\n\n"
+ "Plot original images\n--------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -87,7 +87,7 @@
},
{
"source": [
- "Plot pixel values distribution\n#############################################################################\n\n"
+ "Plot pixel values distribution\n------------------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
@@ -105,7 +105,7 @@
},
{
"source": [
- "Plot transformed images\n#############################################################################\n\n"
+ "Plot transformed images\n-----------------------\n\n"
],
"cell_type": "markdown",
"metadata": {}
diff --git a/docs/source/auto_examples/plot_otda_mapping_colors_images.py b/docs/source/auto_examples/plot_otda_mapping_colors_images.py
index 5590286..5f1e844 100644
--- a/docs/source/auto_examples/plot_otda_mapping_colors_images.py
+++ b/docs/source/auto_examples/plot_otda_mapping_colors_images.py
@@ -45,7 +45,7 @@ def minmax(I):
##############################################################################
# Generate data
-##############################################################################
+# -------------
# Loading images
I1 = ndimage.imread('../data/ocean_day.jpg').astype(np.float64) / 256
@@ -66,7 +66,7 @@ Xt = X2[idx2, :]
##############################################################################
# Domain adaptation for pixel distribution transfer
-##############################################################################
+# -------------------------------------------------
# EMDTransport
ot_emd = ot.da.EMDTransport()
@@ -97,7 +97,7 @@ Image_mapping_gaussian = minmax(mat2im(X1tn, I1.shape))
##############################################################################
# Plot original images
-##############################################################################
+# --------------------
pl.figure(1, figsize=(6.4, 3))
pl.subplot(1, 2, 1)
@@ -114,7 +114,7 @@ pl.tight_layout()
##############################################################################
# Plot pixel values distribution
-##############################################################################
+# ------------------------------
pl.figure(2, figsize=(6.4, 5))
@@ -136,7 +136,7 @@ pl.tight_layout()
##############################################################################
# Plot transformed images
-##############################################################################
+# -----------------------
pl.figure(2, figsize=(10, 5))
diff --git a/docs/source/auto_examples/plot_otda_mapping_colors_images.rst b/docs/source/auto_examples/plot_otda_mapping_colors_images.rst
index 9995103..86b1312 100644
--- a/docs/source/auto_examples/plot_otda_mapping_colors_images.rst
+++ b/docs/source/auto_examples/plot_otda_mapping_colors_images.rst
@@ -57,7 +57,7 @@ estimation [8].
Generate data
-#############################################################################
+-------------
@@ -88,7 +88,7 @@ Generate data
Domain adaptation for pixel distribution transfer
-#############################################################################
+-------------------------------------------------
@@ -168,7 +168,7 @@ Domain adaptation for pixel distribution transfer
Plot original images
-#############################################################################
+--------------------
@@ -198,7 +198,7 @@ Plot original images
Plot pixel values distribution
-#############################################################################
+------------------------------
@@ -233,7 +233,7 @@ Plot pixel values distribution
Plot transformed images
-#############################################################################
+-----------------------
@@ -283,7 +283,7 @@ Plot transformed images
-**Total running time of the script:** ( 2 minutes 8.746 seconds)
+**Total running time of the script:** ( 2 minutes 5.213 seconds)
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 0a822e5..156b878 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -33,7 +33,7 @@ class Mock(MagicMock):
return MagicMock()
MOCK_MODULES = ['ot.lp.emd_wrap','autograd','pymanopt','cudamat','autograd.numpy','pymanopt.manifolds','pymanopt.solvers']
# 'autograd.numpy','pymanopt.manifolds','pymanopt.solvers',
-##sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
+###sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# !!!!
# If extensions (or modules to document with autodoc) are in another directory,