summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2021-12-31 14:30:25 +0100
committerGard Spreemann <gspr@nonempty.org>2021-12-31 14:30:25 +0100
commit6a78816caab62e88ee30d4bec63308aaa13e75d8 (patch)
treed8feefde1ae0628927f1959ddc78ca9aec507302 /examples
parent764bda6b9fcc0e17d09e3d6a62b2fa54d7abefc1 (diff)
parentc4753bd3f74139af8380127b66b484bc09b50661 (diff)
Merge branch 'dfsg/latest' into debian/sid
Diffstat (limited to 'examples')
-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