diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2017-09-01 15:31:44 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2017-09-01 15:31:44 +0200 |
commit | 062071b20d1d40c64bb619931bd11bd28e780485 (patch) | |
tree | 74bfcd48bb65304c2a5be74c24cdff29bd82ba4b /docs/source/auto_examples/plot_optim_OTreg.py | |
parent | 212f3889b1114026765cda0134e02766daa82af2 (diff) |
update example with rst titles
Diffstat (limited to 'docs/source/auto_examples/plot_optim_OTreg.py')
-rw-r--r-- | docs/source/auto_examples/plot_optim_OTreg.py | 23 |
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) |