Linear mapping + tests by rflamary · Pull Request #42 · PythonOT/POT

ncourty

* Linear OT [14] and Joint OT matrix and mapping estimation [8].
* Wasserstein Discriminant Analysis [11] (requires autograd + pymanopt).
* Gromov-Wasserstein distances and barycenters [12]
* Gromov-Wasserstein distances and barycenters ([13] and regularized [12])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regularized what ?

$(PYTHON) -m pytest -v test/ --cov=ot --cov-report html:cov_html

pytest : FORCE
python -m py.test -v test/ --cov=ot

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(PYTHON) here ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes its defined at the top of the file.

I will put it for every call to python.


[14] Knott, M. and Smith, C. S. [On the optimal mapping of distributions](https://link.springer.com/article/10.1007/BF00934745), Journal of Optimization Theory and Applications Vol 43, 1984.

[15] Peyré, G., & Cuturi, M. (2017). [Computational Optimal Transport](https://arxiv.org/pdf/1803.00567.pdf) , 2018.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2018

distributions <https://link.springer.com/article/10.1007/BF00934745>`__,
Journal of Optimization Theory and Applications Vol 43, 1984.

[15] Peyré, G., & Cuturi, M. (2017). `Computational Optimal

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2017 --> 2018

wt=None, bias=True, log=False):
""" return OT linear operator between samples

The function estimate the optimal linear operator that align the two

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

estimateS
alignS


The function estimate the optimal linear operator that align the two
empirical distributions. This is equivalent to estimating the closed
form mapping between two Gaussian distribution :math:`N(\mu_s,\Sigma_s)`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distributionS

xt : np.ndarray (nt,d)
samples in the target domain
reg : float,optional
regularization added to the daigonals of convariances (>0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diagonals

class LinearTransport(BaseTransport):
""" OT linear operator between empirical distributions

The function estimate the optimal linear operator that align the two

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same typos here that for the corresponding function