summaryrefslogtreecommitdiff
path: root/docs/source/auto_examples/plot_otda_mapping.rst
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2017-09-01 15:31:44 +0200
committerRémi Flamary <remi.flamary@gmail.com>2017-09-01 15:31:44 +0200
commit062071b20d1d40c64bb619931bd11bd28e780485 (patch)
tree74bfcd48bb65304c2a5be74c24cdff29bd82ba4b /docs/source/auto_examples/plot_otda_mapping.rst
parent212f3889b1114026765cda0134e02766daa82af2 (diff)
update example with rst titles
Diffstat (limited to 'docs/source/auto_examples/plot_otda_mapping.rst')
-rw-r--r--docs/source/auto_examples/plot_otda_mapping.rst105
1 files changed, 52 insertions, 53 deletions
diff --git a/docs/source/auto_examples/plot_otda_mapping.rst b/docs/source/auto_examples/plot_otda_mapping.rst
index 088da31..ddc1ee9 100644
--- a/docs/source/auto_examples/plot_otda_mapping.rst
+++ b/docs/source/auto_examples/plot_otda_mapping.rst
@@ -3,13 +3,13 @@
.. _sphx_glr_auto_examples_plot_otda_mapping.py:
-===============================================
-OT mapping estimation for domain adaptation [8]
-===============================================
+===========================================
+OT mapping estimation for domain adaptation
+===========================================
This example presents how to use MappingTransport to estimate at the same
time both the coupling transport and approximate the transport map with either
-a linear or a kernelized mapping as introduced in [8]
+a linear or a kernelized mapping as introduced in [8].
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard,
"Mapping estimation for discrete optimal transport",
@@ -36,7 +36,7 @@ a linear or a kernelized mapping as introduced in [8]
-generate data
+Generate data
#############################################################################
@@ -66,6 +66,30 @@ generate data
+Plot data
+#############################################################################
+
+
+
+.. code-block:: python
+
+
+ pl.figure(1, (10, 5))
+ pl.clf()
+ pl.scatter(Xs[:, 0], Xs[:, 1], c=ys, marker='+', label='Source samples')
+ pl.scatter(Xt[:, 0], Xt[:, 1], c=yt, marker='o', label='Target samples')
+ pl.legend(loc=0)
+ pl.title('Source and target distributions')
+
+
+
+
+
+.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_001.png
+ :align: center
+
+
+
Instantiate the different transport algorithms and fit them
#############################################################################
@@ -112,54 +136,29 @@ Instantiate the different transport algorithms and fit them
It. |Loss |Delta loss
--------------------------------
- 0|4.273804e+03|0.000000e+00
- 1|4.264510e+03|-2.174580e-03
- 2|4.264209e+03|-7.047095e-05
- 3|4.264078e+03|-3.069822e-05
- 4|4.264018e+03|-1.412924e-05
- 5|4.263961e+03|-1.341165e-05
- 6|4.263946e+03|-3.586522e-06
+ 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
It. |Loss |Delta loss
--------------------------------
- 0|4.294523e+02|0.000000e+00
- 1|4.247737e+02|-1.089443e-02
- 2|4.245516e+02|-5.228765e-04
- 3|4.244430e+02|-2.557417e-04
- 4|4.243724e+02|-1.663904e-04
- 5|4.243196e+02|-1.244111e-04
- 6|4.242808e+02|-9.132500e-05
- 7|4.242497e+02|-7.331710e-05
- 8|4.242271e+02|-5.326612e-05
- 9|4.242063e+02|-4.916026e-05
- 10|4.241906e+02|-3.699617e-05
-
-
-plot data
-#############################################################################
-
-
-
-.. code-block:: python
-
-
- pl.figure(1, (10, 5))
- pl.clf()
- pl.scatter(Xs[:, 0], Xs[:, 1], c=ys, marker='+', label='Source samples')
- pl.scatter(Xt[:, 0], Xt[:, 1], c=yt, marker='o', label='Target samples')
- pl.legend(loc=0)
- pl.title('Source and target distributions')
-
-
-
-
-
-.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_001.png
- :align: center
-
-
-
-
-plot transported samples
+ 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
+
+
+Plot transported samples
#############################################################################
@@ -209,7 +208,7 @@ plot transported samples
-**Total running time of the script:** ( 0 minutes 0.853 seconds)
+**Total running time of the script:** ( 0 minutes 0.869 seconds)
@@ -228,4 +227,4 @@ plot transported samples
.. rst-class:: sphx-glr-signature
- `Generated by Sphinx-Gallery <http://sphinx-gallery.readthedocs.io>`_
+ `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_