summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlexandre Gramfort <alexandre.gramfort@m4x.org>2016-12-02 12:49:38 +0100
committerAlexandre Gramfort <alexandre.gramfort@m4x.org>2016-12-02 12:57:25 +0100
commitf439f777084690ecbf54bcd8d67dadc883fffa31 (patch)
tree56c8a160fb6edcdaca8ca6ce6de1949b9bc33b77 /examples
parent8dbfd3edae649f5f3e87be4a3ce446c59729b2f7 (diff)
first attempt to support sphinx-gallery
Diffstat (limited to 'examples')
-rw-r--r--examples/plot_OTDA_2D.py (renamed from examples/demo_OTDA_2D.py)3
-rw-r--r--examples/plot_OTDA_classes.py (renamed from examples/demo_OTDA_classes.py)3
-rw-r--r--examples/plot_OTDA_color_images.py (renamed from examples/demo_OTDA_color_images.py)2
-rw-r--r--examples/plot_OTDA_mapping.py (renamed from examples/demo_OTDA_mapping.py)7
-rw-r--r--examples/plot_OTDA_mapping_color_images.py (renamed from examples/demo_OTDA_mapping_color_images.py)3
-rw-r--r--examples/plot_OT_1D.py (renamed from examples/demo_OT_1D.py)2
-rw-r--r--examples/plot_OT_2D_samples.py (renamed from examples/demo_OT_2D_samples.py)2
-rw-r--r--examples/plot_barycenter_1D.py (renamed from examples/demo_barycenter_1D.py)0
-rw-r--r--examples/plot_optim_OTreg.py (renamed from examples/demo_optim_OTreg.py)0
9 files changed, 14 insertions, 8 deletions
diff --git a/examples/demo_OTDA_2D.py b/examples/plot_OTDA_2D.py
index fbaf56d..db04c5e 100644
--- a/examples/demo_OTDA_2D.py
+++ b/examples/plot_OTDA_2D.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
"""
+===============================================
demo of Optimal transport for domain adaptation
+===============================================
+
"""
import numpy as np
diff --git a/examples/demo_OTDA_classes.py b/examples/plot_OTDA_classes.py
index b2da7de..999be53 100644
--- a/examples/demo_OTDA_classes.py
+++ b/examples/plot_OTDA_classes.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
"""
+===============================================
demo of Optimal transport for domain adaptation
+===============================================
+
"""
import matplotlib.pylab as pl
diff --git a/examples/demo_OTDA_color_images.py b/examples/plot_OTDA_color_images.py
index 715707d..7ddaa2b 100644
--- a/examples/demo_OTDA_color_images.py
+++ b/examples/plot_OTDA_color_images.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
"""
+=====================================================================================
Demo of Optimal transport for domain adaptation with image color adaptation as in [6]
+=====================================================================================
[6] Ferradans, S., Papadakis, N., Peyré, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
"""
diff --git a/examples/demo_OTDA_mapping.py b/examples/plot_OTDA_mapping.py
index 50c1df2..779fa76 100644
--- a/examples/demo_OTDA_mapping.py
+++ b/examples/plot_OTDA_mapping.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
"""
+=======================================================
Demo of OT mapping estimation for domain adaptation [8]
+=======================================================
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard, "Mapping estimation for
discrete optimal transport", Neural Information Processing Systems (NIPS), 2016.
@@ -106,8 +108,3 @@ pl.subplot(2,2,4)
pl.scatter(xt[:,0],xt[:,1],c=yt,marker='o',label='Target samples',alpha=.2)
pl.scatter(xst_kernel[:,0],xst_kernel[:,1],c=ys,marker='+',label='Learned mapping')
pl.title("Estim. mapping (kernel)")
-
-
-
-
-
diff --git a/examples/demo_OTDA_mapping_color_images.py b/examples/plot_OTDA_mapping_color_images.py
index 2744f6c..0cd6c9c 100644
--- a/examples/demo_OTDA_mapping_color_images.py
+++ b/examples/plot_OTDA_mapping_color_images.py
@@ -1,13 +1,14 @@
# -*- coding: utf-8 -*-
"""
+======================================================================================================================
Demo of Optimal transport for domain adaptation with image color adaptation as in [6] with mapping estimation from [8]
+======================================================================================================================
[6] Ferradans, S., Papadakis, N., Peyré, 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.
-
"""
import numpy as np
diff --git a/examples/demo_OT_1D.py b/examples/plot_OT_1D.py
index df65a60..a8bbbd6 100644
--- a/examples/demo_OT_1D.py
+++ b/examples/plot_OT_1D.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
"""
+=============================
Demo for 1D optimal transport
+=============================
@author: rflamary
"""
diff --git a/examples/demo_OT_2D_samples.py b/examples/plot_OT_2D_samples.py
index e9ec78a..e55eff8 100644
--- a/examples/demo_OT_2D_samples.py
+++ b/examples/plot_OT_2D_samples.py
@@ -74,5 +74,3 @@ pl.plot(xs[:,0],xs[:,1],'+b',label='Source samples')
pl.plot(xt[:,0],xt[:,1],'xr',label='Target samples')
pl.legend(loc=0)
pl.title('OT matrix Sinkhorn with samples')
-
-
diff --git a/examples/demo_barycenter_1D.py b/examples/plot_barycenter_1D.py
index 5466332..5466332 100644
--- a/examples/demo_barycenter_1D.py
+++ b/examples/plot_barycenter_1D.py
diff --git a/examples/demo_optim_OTreg.py b/examples/plot_optim_OTreg.py
index 0de6b08..0de6b08 100644
--- a/examples/demo_optim_OTreg.py
+++ b/examples/plot_optim_OTreg.py