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

Wasserstein disctance for multivariate distributions #38

Open
ignace-computing opened this issue Nov 9, 2023 · 1 comment
Open

Wasserstein disctance for multivariate distributions #38

ignace-computing opened this issue Nov 9, 2023 · 1 comment

Comments

@ignace-computing
Copy link

Dear package maintainers,

May I please ask a question?
Is there a way to get the following working?
In words: applying wasserstein for multivariate distributions.

using KernelFunctions
using ExactOptimalTransport
mu = discretemeasure(RowVecs(rand(7,3)))
nu = discretemeasure(RowVecs(rand(7,3)))
wasserstein(mu,nu)

This throws an error.

Many thanks!
Ignace

@zsteve
Copy link
Member

zsteve commented Nov 10, 2023

Hi @ignace-computing ,
You seem to be wanting to solve discrete transport between multivariate empirical distributions, and it seems like wasserstein doesn't support that. I haven't got time to investigate in detail yet but my guess is that wasserstein only works for parametric distributions.
perhaps try out emd/emd2? these work for general discrete inputs and would require you to explicitly pass a cost matrix together with weights (in your case, uniform).

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