-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stopThr
not used in empirical_sinkhorn_divergence
#421
Comments
Hello @tlacombe you are absolutely right and we would welcome your PR. |
Also note that we do not exactly compute teh sinkhorn divergence because the losses retruned by sinkhorn2 and empirical_sinkhorn2 do not include the entropy term. We should add a parameter to those function to return the full loss with entropy but in the meantime I would appreciate that you update teh ducumentation to reflect that we are not doing that at the moment. |
Ok I may do that as well, perhaps in a different PR to avoid confusion |
Closing this issue since the PR was merged |
Describe the bug
ot.bregman.empirical_sinkhorn_divergence
has (as most functions in the module) a parameterstopThr
to control the desired marginal error, with default value1e-9
. However, this functions callsempirical_sinkhorn2
withstopThr=1e-9
(hardcoded), so that the parameterstopThr
ofempirical_sinkhorn_divergence
has no effect.Code sample
Outputs:
Expected behavior
The iterations should stop when
Err < stopThr
, not1e-9
.Additional information
A similar issue seems to occur in
sinkhorn_epsilon_scaling
wherestopThr=1e-9
(hardcoded) in the subsequent call tosinkhorn_stabilized(..., stopThr=1e-9)
.Fix proposition
Unless this behavior is on purpose (in which case it may be useful to document it), a reasonable fix is to change
stopThr=1e-9
tostopThr=stopThr
in the subcalls (6 instances inempirical_sinkhorn_divergence
, 1 insinkhorn_epsilon_scaling
, as far as I can tell).I can take care of the fix PR if this is a good solution (or let it to someone used to contribute to POT who can do that in 2 min).
The text was updated successfully, but these errors were encountered: