Skip to content
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

Batch OT sampling of conditional PDFs #120

Open
CaioDaumann opened this issue Jun 19, 2024 · 2 comments
Open

Batch OT sampling of conditional PDFs #120

CaioDaumann opened this issue Jun 19, 2024 · 2 comments

Comments

@CaioDaumann
Copy link

Dear experts,

Thank you very much for this nice package! I am trying to use your batch OT version of flow matching to perform the matching between two distributions, but I wonder how the OT mapping should work for conditional distributions.

Suppose I have a function y(x|c) and I want to transport it to z(x|c). When I sample n_events from these distributions, they will have different c values among themselves. How can one perform OT mapping between "events" with different condition values?

I thought of something like this: we split the data into bins of c [0, 0.1, 0.2, ...] where we don't expect the PDFs to change much, and during training, sample only events of y(x|c) and z(x|c) where the events of both are in the same bin.

Does that sound reasonable to you? Or is there a clever and simpler way to do it?

Best,
Caio

@atong01
Copy link
Owner

atong01 commented Jul 1, 2024

Hi @CaioDaumann,

Apologies for the delay. This seems fine to me, and is probably the best I can think of to do with relatively small data.

Did it work? :)

@CaioDaumann
Copy link
Author

Hi @atong01 ,

Why do you say "best I can think of to do with relatively small data"? I actually have around 12 million events of both y(x|c) and z(x|c). Do you think there is a better solution for "big data"?

I still haven't had time to try it, but I will do so in the next few days and let you know if it worked.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants