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

Need the input to be positive? #1

Open
bbsun opened this issue Dec 5, 2018 · 1 comment
Open

Need the input to be positive? #1

bbsun opened this issue Dec 5, 2018 · 1 comment

Comments

@bbsun
Copy link

bbsun commented Dec 5, 2018

For conventional OT defination, it is the distance between to probablity distribution and the input should be nonegative. But in the code of examples, I find x = np.random.normal(0, 1, (batch_size, dim)) so that x can be negative. Can this be an issue?

@rythei
Copy link
Owner

rythei commented Dec 5, 2018

I'm not sure I understand exactly what you mean -- the OT/Wasserstein distance does indeed define a metric between probability measures, which are positive (and take value in [0,1]). But random variables distributed according to those measures can surely be positive or negative. In the case you mentioned, if X is N(0,1), then its distribution is (2*pi)^(-1/2)exp(-x^2/2)dx, which is positive, but it defines a distribution over all of R.

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