Skip to content

Error in the definition of the Wasserstein distance from the user guide #779

Closed

Description

@jupall

Describe the bug

I have found a typo in the user guide which can be quite misleading.

The Wasserstein distance should be defined for a specific metric $$d$$ on the real numbers, e.g., the Euclidean norm, and a specific order $$p$$.

The definition given in the documentation is as follows:

$$ W_p(a,b)=(\min_{\gamma \in \mathbb{R}_+^{m\times n}} \sum_{i,j}\gamma_{i,j} |x_i-y_j |_p)^\frac{1}{p}$$

$$ s.t. \gamma 1 = a; \gamma^T 1= b; \gamma\geq 0 $$

The order- $$p$$ should be a power of the metric $$d$$.

See link to documentation.

To be exact, we would need a definition such as :

$$ W_p(a,b)=(\min_{\gamma \in \mathbb{R}_+^{m\times n}} \sum_{i,j}\gamma_{i,j}d(x_i,y_j)^p)^\frac{1}{p}$$

$$ s.t. \gamma 1 = a; \gamma^T 1= b; \gamma\geq 0 $$

Or if $$d$$ is specifically defined as any arbitrary norm $$|\cdot|$$ on the real numbers:

$$ W_p(a,b)=(\min_{\gamma \in \mathbb{R}_+^{m\times n}} \sum_{i,j}\gamma_{i,j}|x_i-y_j|^p)^\frac{1}{p}$$

$$ s.t. \gamma 1 = a; \gamma^T 1= b; \gamma\geq 0 $$

Thanks for your time.

Activity

  1. rflamary commented on Nov 10, 2025

    @rflamary
    Collaborator

    yes this is a typo, feel free to propose a Pull request to fix that.

  2. added a commit that references this issue on Feb 22, 2026
    bd188a4
  3. added a commit that references this issue on Feb 23, 2026
    a628dd6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions