summaryrefslogtreecommitdiff
path: root/examples/gromov/plot_fgw.py
diff options
context:
space:
mode:
authorRĂ©mi Flamary <remi.flamary@gmail.com>2020-12-22 18:35:40 +0100
committerGitHub <noreply@github.com>2020-12-22 18:35:40 +0100
commitf6139428e70ce964de3bef703ef13aa701a83620 (patch)
treedac5b59d6b53fdbc4bcfda2db7eb666cbcaa49af /examples/gromov/plot_fgw.py
parentcb3e24aea8a2492ccb7e7664533ea3543b14c8ac (diff)
[WIP] Update documentation "Why OT" section (#220)
* add some text + discussion sinkhorn * stating wrk on why POT * fix sphinx warnings + make html-noplot * discussion when not to use POT * add discussion which sinkhorn * edits on quickstart * more * remove warnings :any: * more * done * remove ref Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
Diffstat (limited to 'examples/gromov/plot_fgw.py')
-rw-r--r--examples/gromov/plot_fgw.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/gromov/plot_fgw.py b/examples/gromov/plot_fgw.py
index 97fe619..5475fb3 100644
--- a/examples/gromov/plot_fgw.py
+++ b/examples/gromov/plot_fgw.py
@@ -26,7 +26,7 @@ from ot.gromov import gromov_wasserstein, fused_gromov_wasserstein
##############################################################################
# Generate data
-# ---------
+# -------------
#%% parameters
# We create two 1D random measures
@@ -76,7 +76,7 @@ pl.show()
##############################################################################
# Create structure matrices and across-feature distance matrix
-# ---------
+# ------------------------------------------------------------
#%% Structure matrices and across-features distance matrix
C1 = ot.dist(xs)
@@ -88,7 +88,7 @@ Got = ot.emd([], [], M)
##############################################################################
# Plot matrices
-# ---------
+# -------------
#%%
cmap = 'Reds'
@@ -131,7 +131,7 @@ pl.show()
##############################################################################
# Compute FGW/GW
-# ---------
+# --------------
#%% Computing FGW and GW
alpha = 1e-3
@@ -145,7 +145,7 @@ Gg, log = gromov_wasserstein(C1, C2, p, q, loss_fun='square_loss', verbose=True,
##############################################################################
# Visualize transport matrices
-# ---------
+# ----------------------------
#%% visu OT matrix
cmap = 'Blues'