diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2017-09-01 17:38:16 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2017-09-01 17:38:16 +0200 |
commit | fd76b98726b8f22606d93bb24dc539967472f4a0 (patch) | |
tree | 042f0664291eea89d4a737ada2d7b045fc338a8f /examples/plot_otda_d2.py | |
parent | e800103299d79cf462c89f34647e7741014c5571 (diff) |
titlke for notebooks
Diffstat (limited to 'examples/plot_otda_d2.py')
-rw-r--r-- | examples/plot_otda_d2.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/plot_otda_d2.py b/examples/plot_otda_d2.py index 3daa0a6..e53d7d6 100644 --- a/examples/plot_otda_d2.py +++ b/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)) |