PythonOT/POT

Clarification on the `u` and `v` dual variables in the `sinkhorn` function with `log=True`

Closed this issue · 3 comments

Hello, I have a question regarding the behavior of the sinkhorn function when log=True is passed. The function returns a dictionary containing the dual variables u and v, but I could not find a clear explanation in the documentation regarding how these values are computed. Could you please clarify the method used to get these values?

Much appreciated, thanks!

u and v are the scaling variable of the sinkhorn that returns the OT plan T=diag(u)K diag(v) .

We need to be more detailed in the documentation. I agree.

I was more so wondering if these are the same dual variables associated with the Sinkhorn problem as defined in the book "Computational Optimal Transport" by Peyré and Cuturi:

image

I need to invert it to f = eps * log(u), g = eps * log(v). Are the u and v defined in the package already in the log domain for example?

yes u and v are the same variables