summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinh Nguyen <10728205+tbng@users.noreply.github.com>2021-12-31 09:52:44 +0000
committerGitHub <noreply@github.com>2021-12-31 10:52:44 +0100
commit40a3b09848d92292ccd5bd298c6cfcd3228465cb (patch)
tree9fab814b4335760220e441b77ee0ba903cbf7277
parentd7f0c9e176a7bba89ec192fd17b88fb7a9149851 (diff)
minor changes for better doc generation in GW with Pytorch example (#330)
-rw-r--r--examples/backends/plot_optim_gromov_pytorch.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/backends/plot_optim_gromov_pytorch.py b/examples/backends/plot_optim_gromov_pytorch.py
index 969707f..cdc1587 100644
--- a/examples/backends/plot_optim_gromov_pytorch.py
+++ b/examples/backends/plot_optim_gromov_pytorch.py
@@ -3,15 +3,15 @@ r"""
Optimizing the Gromov-Wasserstein distance with PyTorch
=================================
-In this exemple we use the pytorch backend to optimize the Gromov-Wasserstein
+In this example, we use the pytorch backend to optimize the Gromov-Wasserstein
(GW) loss between two graphs expressed as empirical distribution.
-In the first example we optimize the weights on the node of a simple template
+In the first part, we optimize the weights on the node of a simple template
graph so that it minimizes the GW with a given Stochastic Block Model graph.
We can see that this actually recovers the proportion of classes in the SBM
and allows for an accurate clustering of the nodes using the GW optimal plan.
-In a second example we optimize simultaneously the weights and the sructure of
+In the second part, we optimize simultaneously the weights and the sructure of
the template graph which allows us to perform graph compression and to recover
other properties of the SBM.
@@ -186,8 +186,7 @@ pl.axis("off")
# %%
# Graph compression with GW
# -------------------------
-
-# Now we optimize both the weights and structure of a small graph that
+# Now we optimize both the weights and structure of a small graph that
# minimize the GW distance wrt our data graph. This can be seen as graph
# compression but can also recover important properties of an SBM such
# as its class proportion but also its matrix of probability of links between