Skip to content

Negative Gromov-Wasserstein distance #406

@WenjunZHAOwO

Description

@WenjunZHAOwO

Hi,

Thank you for the extremely helpful software! Sometimes I encounter a negative value of gw_dist returned by gromov.entropic_gromov_wasserstein() function:

gw1, log1 = ot.gromov.entropic_gromov_wasserstein(
    C1, C2, p, q, 'square_loss', epsilon=0.01, log=True, verbose=True)
print(log1['gw_dist'])

However, from my understanding, the distance part has to be nonnegative given the square loss. Could you help me with my confusion? If helpful at all, my cost matrices are nonnegative, symmetric integer matrices of sizes 267267 and 250250, and the marginals p and q are uniform. The negative gw_dist value appears for epsilon=0.01, but not for epsilon=0.02 or 0.05.

The version of packages is:

macOS-10.16-x86_64-i386-64bit
Python 3.8.8 (default, Apr 13 2021, 12:59:45) 
[Clang 10.0.0 ]
NumPy 1.20.1
SciPy 1.6.2
POT 0.8.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions