Hi, I'm using OT package for GW, and I have a question regarding two arguments of the ot.gromov.gromov_wasserstein function. What is p and q? I couldn't see them in the objective function of the GW. p = ot.unif(n_samples)q = ot.unif(n_samples) gw0, log0 = ot.gromov.gromov_wasserstein( C1, C2, p, q, 'square_loss', verbose=True, log=True) gw, log = ot.gromov.entropic_gromov_wasserstein( C1, C2, p, q, 'square_loss', epsilon=5e-4, log=True, verbose=True) print('Gromov-Wasserstein distances: ' + str(log0['gw_dist']))print('Entropic Gromov-Wasserstein distances: ' + str(log['gw_dist']))
Hello Azim, Since we are manipulating empirical probability distributions, p and q are vectors of probability masses per samples in your distribution. Indeed, it is generally a common choice to consider them as equal and set them as 1/(number of samples in the distribution). Hope this helps, Best regards, Nicolas
Le 8 août 2019 à 21:53, Azim Dehghani Amirabad <azim.dehghani@gmail.com> a écrit :
Hi,
I'm using OT package for GW, and I have a question regarding two arguments of the ot.gromov.gromov_wasserstein function. What is p and q? I couldn't see them in the objective function of the GW.
p = ot.unif(n_samples) q = ot.unif(n_samples)
gw0, log0 = ot.gromov.gromov_wasserstein( C1, C2, p, q, 'square_loss', verbose=True, log=True)
gw, log = ot.gromov.entropic_gromov_wasserstein( C1, C2, p, q, 'square_loss', epsilon=5e-4, log=True, verbose=True)
print('Gromov-Wasserstein distances: ' + str(log0['gw_dist'])) print('Entropic Gromov-Wasserstein distances: ' + str(log['gw_dist'])) _______________________________________________ POT mailing list -- pot@python.org To unsubscribe send an email to pot-leave@python.org https://mail.python.org/mailman3/lists/pot.python.org/
Bon à entendre, peut partager plus d'informations avec nous. https://bit.ly/3yVeKoF
participants (3)
-
Azim Dehghani Amirabad
-
Cheryl Grant
-
Nicolas Courty