Note
Click here to download the full example code
1D Unbalanced optimal transport¶
This example illustrates the computation of Unbalanced Optimal transport using a Kullback-Leibler relaxation.
# Author: Hicham Janati <hicham.janati@inria.fr>
#
# License: MIT License
import numpy as np
import matplotlib.pylab as pl
import ot
import ot.plot
from ot.datasets import make_1D_gauss as gauss
Generate data¶
Solve Unbalanced Sinkhorn¶

Out:
/home/circleci/project/examples/plot_UOT_1D.py:76: 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.470 seconds)