From 40a3b09848d92292ccd5bd298c6cfcd3228465cb Mon Sep 17 00:00:00 2001 From: Binh Nguyen <10728205+tbng@users.noreply.github.com> Date: Fri, 31 Dec 2021 09:52:44 +0000 Subject: minor changes for better doc generation in GW with Pytorch example (#330) --- examples/backends/plot_optim_gromov_pytorch.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3