summaryrefslogtreecommitdiff
path: root/docs/source/auto_examples/plot_otda_linear_mapping.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_linear_mapping.rst
parent8acaf262baa04a4d2bdd9c774c45c5bb2fb2d12a (diff)
big update examples
Diffstat (limited to 'docs/source/auto_examples/plot_otda_linear_mapping.rst')
-rw-r--r--docs/source/auto_examples/plot_otda_linear_mapping.rst89
1 files changed, 62 insertions, 27 deletions
diff --git a/docs/source/auto_examples/plot_otda_linear_mapping.rst b/docs/source/auto_examples/plot_otda_linear_mapping.rst
index 8e2e0cf..63848d2 100644
--- a/docs/source/auto_examples/plot_otda_linear_mapping.rst
+++ b/docs/source/auto_examples/plot_otda_linear_mapping.rst
@@ -1,6 +1,12 @@
+.. only:: html
+
+ .. note::
+ :class: sphx-glr-download-link-note
+ Click :ref:`here <sphx_glr_download_auto_examples_plot_otda_linear_mapping.py>` to download the full example code
+ .. rst-class:: sphx-glr-example-title
-.. _sphx_glr_auto_examples_plot_otda_linear_mapping.py:
+ .. _sphx_glr_auto_examples_plot_otda_linear_mapping.py:
============================
@@ -10,8 +16,7 @@ Linear OT mapping estimation
-
-.. code-block:: python
+.. code-block:: default
# Author: Remi Flamary <remi.flamary@unice.fr>
@@ -28,12 +33,12 @@ Linear OT mapping estimation
+
Generate data
-------------
-
-.. code-block:: python
+.. code-block:: default
n = 1000
@@ -64,12 +69,12 @@ Generate data
+
Plot data
---------
-
-.. code-block:: python
+.. code-block:: default
pl.figure(1, (5, 5))
@@ -81,8 +86,17 @@ Plot data
.. image:: /auto_examples/images/sphx_glr_plot_otda_linear_mapping_001.png
- :align: center
+ :class: sphx-glr-single-img
+
+
+.. rst-class:: sphx-glr-script-out
+ Out:
+
+ .. code-block:: none
+
+
+ [<matplotlib.lines.Line2D object at 0x7f4c73a37320>]
@@ -90,8 +104,7 @@ Estimate linear mapping and transport
-------------------------------------
-
-.. code-block:: python
+.. code-block:: default
Ae, be = ot.da.OT_mapping_linear(xs, xt)
@@ -105,12 +118,12 @@ Estimate linear mapping and transport
+
Plot transported samples
------------------------
-
-.. code-block:: python
+.. code-block:: default
pl.figure(1, (5, 5))
@@ -125,7 +138,17 @@ Plot transported samples
.. image:: /auto_examples/images/sphx_glr_plot_otda_linear_mapping_002.png
- :align: center
+ :class: sphx-glr-single-img
+
+
+.. rst-class:: sphx-glr-script-out
+
+ Out:
+
+ .. code-block:: none
+
+ /home/rflamary/PYTHON/POT/examples/plot_otda_linear_mapping.py:73: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
+ pl.show()
@@ -134,8 +157,7 @@ Load image data
---------------
-
-.. code-block:: python
+.. code-block:: default
@@ -167,12 +189,12 @@ Load image data
+
Estimate mapping and adapt
----------------------------
-
-.. code-block:: python
+.. code-block:: default
mapping = ot.da.LinearTransport()
@@ -186,8 +208,6 @@ Estimate mapping and adapt
I1t = minmax(mat2im(xst, I1.shape))
I2t = minmax(mat2im(xts, I2.shape))
- # %%
-
@@ -199,8 +219,7 @@ Plot transformed images
-----------------------
-
-.. code-block:: python
+.. code-block:: default
pl.figure(2, figsize=(10, 7))
@@ -227,28 +246,44 @@ Plot transformed images
-.. image:: /auto_examples/images/sphx_glr_plot_otda_linear_mapping_004.png
- :align: center
+.. image:: /auto_examples/images/sphx_glr_plot_otda_linear_mapping_003.png
+ :class: sphx-glr-single-img
+
+.. rst-class:: sphx-glr-script-out
+ Out:
+ .. code-block:: none
-**Total running time of the script:** ( 0 minutes 0.635 seconds)
+ Text(0.5, 1.0, 'Inverse mapping Im. 2')
+
+
+
+
+.. rst-class:: sphx-glr-timing
+
+ **Total running time of the script:** ( 0 minutes 0.787 seconds)
+
+
+.. _sphx_glr_download_auto_examples_plot_otda_linear_mapping.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_linear_mapping.py <plot_otda_linear_mapping.py>`
- .. container:: sphx-glr-download
+ .. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: plot_otda_linear_mapping.ipynb <plot_otda_linear_mapping.ipynb>`
@@ -257,4 +292,4 @@ Plot transformed images
.. 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>`_