summaryrefslogtreecommitdiff
path: root/docs/source/auto_examples/plot_optim_OTreg.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/auto_examples/plot_optim_OTreg.py')
-rw-r--r--docs/source/auto_examples/plot_optim_OTreg.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/docs/source/auto_examples/plot_optim_OTreg.py b/docs/source/auto_examples/plot_optim_OTreg.py
index d36b269..b362662 100644
--- a/docs/source/auto_examples/plot_optim_OTreg.py
+++ b/docs/source/auto_examples/plot_optim_OTreg.py
@@ -4,6 +4,24 @@
Regularized OT with generic solver
==================================
+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].
+
+
+[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.
+
+[7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized
+conditional gradient: analysis of convergence and applications.
+arXiv preprint arXiv:1510.06567.
+
+
"""
@@ -13,7 +31,7 @@ import ot
##############################################################################
-# Generate data
+# Generate data
##############################################################################
#%% parameters
@@ -32,7 +50,7 @@ M = ot.dist(x.reshape((n, 1)), x.reshape((n, 1)))
M /= M.max()
##############################################################################
-# Solve EMD
+# Solve EMD
##############################################################################
#%% EMD
@@ -92,6 +110,7 @@ ot.plot.plot1D_mat(a, b, Ge, 'OT matrix Entrop. reg')
#%% Example with Frobenius norm + entropic regularization with gcg
+
def f(G):
return 0.5 * np.sum(G**2)