summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2019-06-07 19:11:21 +0200
committerRémi Flamary <remi.flamary@gmail.com>2019-06-07 19:11:21 +0200
commit4ae7e98b255bef3522e76b2c321b6938378d8dc7 (patch)
tree3638f43b1747804fe373c97ab0f5faa6ef874b66 /docs
parent1171f7e39742c207dad6ab5fd15f59ed62f8f4a5 (diff)
debut doc
Diffstat (limited to 'docs')
-rw-r--r--docs/source/howto.rst25
-rw-r--r--docs/source/index.rst1
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/source/howto.rst b/docs/source/howto.rst
new file mode 100644
index 0000000..48b1532
--- /dev/null
+++ b/docs/source/howto.rst
@@ -0,0 +1,25 @@
+
+How to ?
+========
+
+In the following we provide some pointers about which functions and classes
+to use for different problems related to optimal transport (OTs).
+
+1. **How to solve a discrete optimal transport problem ?**
+
+ The solver for discrete is the function :py:mod:`ot.emd` that returns
+ the OT transport matrix. If you want to solve a regularized OT you can
+ use :py:mod:`ot.sinkhorn`.
+
+ More detailed examples can be seen on this :ref:`auto_examples/plot_OT_2D_samples`
+
+ Here is a simple use case:
+
+ .. code:: python
+
+ # a,b are 1D histograms (sum to 1 and positive)
+ # M is the ground cost matrix
+ T=ot.emd(a,b,M) # exact linear program
+ T_reg=ot.sinkhorn(a,b,M,reg) # entropic regularized OT
+
+
diff --git a/docs/source/index.rst b/docs/source/index.rst
index b8eabcb..d92f50f 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -13,6 +13,7 @@ Contents
:maxdepth: 3
self
+ howto
all
auto_examples/index