You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the unbalanced module, the sinkhorn_stabilized_unbalanced gives different results than sinkhorn_knopp_unbalanced, when absorbing is used. If the absorbing is not used, then the results agree. The example in documentation does not trigger absorbing.
Code sample
import ot
import numpy as np
a=[.3, .7]
b=[.7, .3]
M=[[0., 1.], [1., 0.]]
reg = 0.01
reg_m = 100
Q1 = ot.sinkhorn_unbalanced(a, b, M, reg, reg_m, reg_type='entropy')
Q2 = ot.unbalanced.sinkhorn_stabilized_unbalanced(a, b, M, reg, reg_m, reg_type='entropy', tau=1000)
print()
print(np.round(Q1,6))
print(np.round(Q2,6))
Expected behavior
Q1 and Q2 should be the same.
Environment (please complete the following information):
Thank you for opening an issue. This behavior does not seem abnormal and essentially comes from numerical instability. Could you check whether you recover the same result, when setting method == "sinkhorn_stabilized" in ot.sinkhorn_unbalanced, than with sinkhorn_stabilized_unbalanced ?
Also tau=1e5 is the default value of the later function used in the wrapper unless you add tau=1000 as argument to ot.sinkhorn_unbalanced.
Describe the bug
In the
unbalanced
module, thesinkhorn_stabilized_unbalanced
gives different results thansinkhorn_knopp_unbalanced
, when absorbing is used. If the absorbing is not used, then the results agree. The example in documentation does not trigger absorbing.Code sample
Expected behavior
Q1 and Q2 should be the same.
Environment (please complete the following information):
Output of the following code snippet:
Additional context
Changing the lines:
to:
seems to be solving the problem.
The text was updated successfully, but these errors were encountered: