diff options
Diffstat (limited to 'docs/source/auto_examples/plot_otda_mapping.rst')
-rw-r--r-- | docs/source/auto_examples/plot_otda_mapping.rst | 107 |
1 files changed, 70 insertions, 37 deletions
diff --git a/docs/source/auto_examples/plot_otda_mapping.rst b/docs/source/auto_examples/plot_otda_mapping.rst index 1d95fc6..99787f7 100644 --- a/docs/source/auto_examples/plot_otda_mapping.rst +++ b/docs/source/auto_examples/plot_otda_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_mapping.py>` to download the full example code + .. rst-class:: sphx-glr-example-title -.. _sphx_glr_auto_examples_plot_otda_mapping.py: + .. _sphx_glr_auto_examples_plot_otda_mapping.py: =========================================== @@ -16,8 +22,7 @@ a linear or a kernelized mapping as introduced in [8]. Neural Information Processing Systems (NIPS), 2016. - -.. code-block:: python +.. code-block:: default # Authors: Remi Flamary <remi.flamary@unice.fr> @@ -36,12 +41,12 @@ a linear or a kernelized mapping as introduced in [8]. + Generate data ------------- - -.. code-block:: python +.. code-block:: default n_source_samples = 100 @@ -66,12 +71,12 @@ Generate data + Plot data --------- - -.. code-block:: python +.. code-block:: default pl.figure(1, (10, 5)) @@ -86,17 +91,25 @@ Plot data .. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_001.png - :align: center + :class: sphx-glr-single-img +.. rst-class:: sphx-glr-script-out + + Out: + + .. code-block:: none + + + Text(0.5, 1.0, 'Source and target distributions') + Instantiate the different transport algorithms and fit them ----------------------------------------------------------- - -.. code-block:: python +.. code-block:: default # MappingTransport with linear kernel @@ -132,38 +145,41 @@ Instantiate the different transport algorithms and fit them .. rst-class:: sphx-glr-script-out - Out:: + Out: + + .. code-block:: none It. |Loss |Delta loss -------------------------------- - 0|4.299275e+03|0.000000e+00 - 1|4.290443e+03|-2.054271e-03 - 2|4.290040e+03|-9.389994e-05 - 3|4.289876e+03|-3.830707e-05 - 4|4.289783e+03|-2.157428e-05 - 5|4.289724e+03|-1.390941e-05 - 6|4.289706e+03|-4.051054e-06 + 0|4.212661e+03|0.000000e+00 + 1|4.198567e+03|-3.345626e-03 + 2|4.198198e+03|-8.797101e-05 + 3|4.198027e+03|-4.059527e-05 + 4|4.197928e+03|-2.355659e-05 + 5|4.197886e+03|-1.002352e-05 + 6|4.197853e+03|-7.873125e-06 It. |Loss |Delta loss -------------------------------- - 0|4.326465e+02|0.000000e+00 - 1|4.282533e+02|-1.015416e-02 - 2|4.279473e+02|-7.145955e-04 - 3|4.277941e+02|-3.580104e-04 - 4|4.277069e+02|-2.039229e-04 - 5|4.276462e+02|-1.418698e-04 - 6|4.276011e+02|-1.054172e-04 - 7|4.275663e+02|-8.145802e-05 - 8|4.275405e+02|-6.028774e-05 - 9|4.275191e+02|-5.005886e-05 - 10|4.275019e+02|-4.021935e-05 + 0|4.231694e+02|0.000000e+00 + 1|4.185911e+02|-1.081889e-02 + 2|4.182717e+02|-7.631953e-04 + 3|4.181271e+02|-3.455908e-04 + 4|4.180328e+02|-2.255461e-04 + 5|4.179645e+02|-1.634435e-04 + 6|4.179136e+02|-1.216359e-04 + 7|4.178752e+02|-9.198108e-05 + 8|4.178465e+02|-6.870868e-05 + 9|4.178243e+02|-5.321390e-05 + 10|4.178054e+02|-4.521725e-05 + + Plot transported samples ------------------------ - -.. code-block:: python +.. code-block:: default pl.figure(2) @@ -202,28 +218,45 @@ Plot transported samples -.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_003.png - :align: center +.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_002.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + Out: + + .. code-block:: none + + /home/rflamary/PYTHON/POT/examples/plot_otda_mapping.py:125: 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 0.795 seconds) +.. rst-class:: sphx-glr-timing + **Total running time of the script:** ( 0 minutes 0.843 seconds) + + +.. _sphx_glr_download_auto_examples_plot_otda_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_mapping.py <plot_otda_mapping.py>` - .. container:: sphx-glr-download + .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_otda_mapping.ipynb <plot_otda_mapping.ipynb>` @@ -232,4 +265,4 @@ 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>`_ |