Skip to content

Commit bed7559

Browse files
committed
regularized OT done
1 parent 56deee6 commit bed7559

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

docs/source/quickstart.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ regularization terms: namely quadratic regularization and group lasso
243243
regularization. But we also provide in :any:`ot.optim` two generic solvers that allows solving any
244244
smooth regularization in practice.
245245

246+
Quadratic regularization
247+
""""""""""""""""""""""""
248+
246249
The first general regularization term we can solve is the quadratic
247250
regularization of the form
248251

@@ -257,6 +260,17 @@ functions :any:`ot.smooth.smooth_ot_dual` or
257260
:any:`ot.smooth.smooth_ot_semi_dual` with parameter :code:`reg_type='l2'` to
258261
choose the quadratic regularization.
259262

263+
.. hint::
264+
Examples of quadratic regularization are available in the following examples:
265+
266+
- :any:`auto_examples/plot_OT_1D_smooth`
267+
- :any:`auto_examples/plot_optim_OTreg`
268+
269+
270+
271+
Group Lasso regularization
272+
""""""""""""""""""""""""""
273+
260274
Another regularization that has been used in recent years is the group lasso
261275
regularization
262276

@@ -276,6 +290,50 @@ convex gourp lasso and we provide a solver using generalized conditional
276290
gradient algorithm [7]_ in function
277291
:any:`ot.da.sinkhorn_l1l2_gl`.
278292

293+
.. hint::
294+
Examples of group Lasso regularization are available in the following examples:
295+
296+
- :any:`auto_examples/plot_otda_classes`
297+
- :any:`auto_examples/plot_otda_d2`
298+
299+
300+
Generic solvers
301+
"""""""""""""""
302+
303+
Finally we propose in POT generic solvers that can be used to solve any
304+
regularization as long as you can provide a function computing the
305+
regularization and a function computing its gradient.
306+
307+
In order to solve
308+
309+
.. math::
310+
\gamma^* = arg\min_\gamma \quad \sum_{i,j}\gamma_{i,j}M_{i,j} + \lambda\Omega(\gamma)
311+
312+
s.t. \gamma 1 = a; \gamma^T 1= b; \gamma\geq 0
313+
314+
you can use function :any:`ot.optim.cg` that will use a conditional gradient as
315+
proposed in [6]_ . you need to provide the regularization function as parameter
316+
``f`` and its gradient as parameter ``df``. Note that the conditional gradient relies on
317+
iterative solving of a linearization of the problem using the exact
318+
:any:`ot.emd` so it can be slow in practice. Still it always returns a
319+
transport matrix that does not violates the marginals.
320+
321+
Another solver is proposed to solve the problem
322+
323+
.. math::
324+
\gamma^* = arg\min_\gamma \quad \sum_{i,j}\gamma_{i,j}M_{i,j}+ \lambda_e\Omega_e(\gamma) + \lambda\Omega(\gamma)
325+
326+
s.t. \gamma 1 = a; \gamma^T 1= b; \gamma\geq 0
327+
328+
where :math:`\Omega_e` is the entropic regularization. In this case we use a
329+
generalized conditional gradient [7]_ implemented in :any:`ot.opim.gcg` that does not linearize the entropic term and
330+
relies on :any:`ot.sinkhorn` for its iterations.
331+
332+
.. hint::
333+
Example of generic solvers are available in the following example:
334+
335+
- :any:`auto_examples/plot_optim_OTreg`
336+
279337

280338

281339
Wasserstein Barycenters

0 commit comments

Comments
 (0)