summaryrefslogtreecommitdiff
path: root/docs/source/auto_examples/plot_otda_d2.rst
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2020-04-20 15:19:09 +0200
committerRémi Flamary <remi.flamary@gmail.com>2020-04-20 15:19:09 +0200
commite65606ae498bd611f6a994868c2a66dfbea403cd (patch)
treeb9b43dcaf8499b6d57b806ce04350fb6b792537f /docs/source/auto_examples/plot_otda_d2.rst
parent8acaf262baa04a4d2bdd9c774c45c5bb2fb2d12a (diff)
big update examples
Diffstat (limited to 'docs/source/auto_examples/plot_otda_d2.rst')
-rw-r--r--docs/source/auto_examples/plot_otda_d2.rst66
1 files changed, 44 insertions, 22 deletions
diff --git a/docs/source/auto_examples/plot_otda_d2.rst b/docs/source/auto_examples/plot_otda_d2.rst
index 80cc34c..6d8e429 100644
--- a/docs/source/auto_examples/plot_otda_d2.rst
+++ b/docs/source/auto_examples/plot_otda_d2.rst
@@ -1,6 +1,12 @@
+.. only:: html
+
+ .. note::
+ :class: sphx-glr-download-link-note
+ Click :ref:`here <sphx_glr_download_auto_examples_plot_otda_d2.py>` to download the full example code
+ .. rst-class:: sphx-glr-example-title
-.. _sphx_glr_auto_examples_plot_otda_d2.py:
+ .. _sphx_glr_auto_examples_plot_otda_d2.py:
===================================================
@@ -16,8 +22,7 @@ transported samples are represented in order to give a visual understanding
of what the transport methods are doing.
-
-.. code-block:: python
+.. code-block:: default
# Authors: Remi Flamary <remi.flamary@unice.fr>
@@ -35,12 +40,12 @@ of what the transport methods are doing.
+
generate data
-------------
-
-.. code-block:: python
+.. code-block:: default
n_samples_source = 150
@@ -59,12 +64,12 @@ generate data
+
Instantiate the different transport algorithms and fit them
-----------------------------------------------------------
-
-.. code-block:: python
+.. code-block:: default
# EMD Transport
@@ -91,12 +96,12 @@ Instantiate the different transport algorithms and fit them
+
Fig 1 : plots source and target samples + matrix of pairwise distance
---------------------------------------------------------------------
-
-.. code-block:: python
+.. code-block:: default
pl.figure(1, figsize=(10, 10))
@@ -126,7 +131,8 @@ Fig 1 : plots source and target samples + matrix of pairwise distance
.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_001.png
- :align: center
+ :class: sphx-glr-single-img
+
@@ -135,8 +141,7 @@ Fig 2 : plots optimal couplings for the different methods
---------------------------------------------------------
-
-.. code-block:: python
+.. code-block:: default
pl.figure(2, figsize=(10, 6))
@@ -187,8 +192,9 @@ Fig 2 : plots optimal couplings for the different methods
-.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_003.png
- :align: center
+.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_002.png
+ :class: sphx-glr-single-img
+
@@ -197,8 +203,7 @@ Fig 3 : plot transported samples
--------------------------------
-
-.. code-block:: python
+.. code-block:: default
# display transported samples
@@ -236,28 +241,45 @@ Fig 3 : plot transported samples
-.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_006.png
- :align: center
+.. image:: /auto_examples/images/sphx_glr_plot_otda_d2_003.png
+ :class: sphx-glr-single-img
+
+
+.. rst-class:: sphx-glr-script-out
+
+ Out:
+ .. code-block:: none
+ /home/rflamary/PYTHON/POT/examples/plot_otda_d2.py:172: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
+ pl.show()
-**Total running time of the script:** ( 0 minutes 35.515 seconds)
+.. rst-class:: sphx-glr-timing
+
+ **Total running time of the script:** ( 0 minutes 21.323 seconds)
+
+
+.. _sphx_glr_download_auto_examples_plot_otda_d2.py:
+
+
.. only :: html
.. container:: sphx-glr-footer
+ :class: sphx-glr-footer-example
+
- .. container:: sphx-glr-download
+ .. container:: sphx-glr-download sphx-glr-download-python
:download:`Download Python source code: plot_otda_d2.py <plot_otda_d2.py>`
- .. container:: sphx-glr-download
+ .. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: plot_otda_d2.ipynb <plot_otda_d2.ipynb>`
@@ -266,4 +288,4 @@ Fig 3 : plot transported samples
.. rst-class:: sphx-glr-signature
- `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
+ `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_