-
Notifications
You must be signed in to change notification settings - Fork 528
[MRG] Add Unbalanced KL Wasserstein distance + barycenter #87
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
Conversation
If you agree with this first draft, I'll work on followup PRs for log-domain, barycenters, convolutional UOT for images, and GPU compatibility. |
Great ! Thanks Hicham ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change address those changes, modify the title to only adding one type and do the rest in subsequent PRs. that would simplify the review process.
Hello @hichamjanati, Thank you very much indeed. I will have a look at your code and do a review myself but it looks great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Hello, this is great. Could you please build the doc with the makefile in the doc folder with |
Also don't forget to update the Readme with:
|
@rflamary Thanks for the feedback |
Hello, The doc builds on my end and on readthedoc so I don't think there is really something wrong with it. The documentation including the latest PR is available in the 'latest' version of the doc: Note that in order to build the doc you need |
Sorry I put the wrong link but even in the latest version, the Fused-Gromov examples |
OK i see, Don't worry, there is not problem. I add the examples semi-manually to the documentation before release because the sphinx-gallery cannot run on readthedoc (you cannot compile stuff). But you have a point, it should be written somewhere, I will add a Readme in the doc folder. What I asked wrt the documentation is that you check that the doc build and that your functions have a correct format (rst is so tricky). I will take care of adding the examples and the notebooks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @hichamjanati ,
we are near merging now.
I did a checkout of your code and the doc builds but there are still a few typos and details missing from the doscstrings (see comments).
Also if you want you new module to appear in the documentation, you need to add it to https://github.com/rflamary/POT/blob/master/docs/source/all.rst. All the functions will be automatically documented. Don't worry about the examples in the documentation, i will take care of it in a next PR.
Ah okay, I see now. I have made the requested changes on the docstrings and init and added the module to source/all.rst. |
Ok @hichamjanati, I will do the merge now. Thank you for this very nice contribution, please I think the stabilized and gpu versions would be very nice follow ups to this PR. |
Hello Hicham, I'm still working on it but you can see the upcoming documentation here: you can see the FGW and your examples here and they work like a charm |
Hello Rémi, |
new unbalanced module for UOT with KL relaxation with the funcs:
sinkhorn_unbalanced
: generalized Sinkhorn to compute Wbarycenter_unbalanced
: unbalanced Wasserstein barycenterTests of convergence for both algorithms
Examples
plot_UOT_1D
andplot_UOT_barycenter_1D
with unbalanced gaussian distributions.