Skip to content

Commit

Permalink
Doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Nicodemus committed Jan 14, 2025
1 parent 5f3eb33 commit b752149
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/notebooks/Example_5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"The big-picture idea behind unbalanced Gromov–Wasserstein (UGW) is that it is less sensitive than ordinary GW to small changes in morphology. Whereas ordinary GW focuses on how well we can align two entire cell morphologies, UGW effectively ask how well we can partially align two cell morphologies, i.e. allowing for unmatched regions.\n",
"In situations where it is acceptable to discard or down-weight small, negligible parts of each cell (so as not to disrupt the global morphology), UGW can be more robust than ordinary GW. Thus, UGW is expected to be less sensitive to tracing errors and missing morphological data.\n",
"\n",
"The definition of Gromov–Wasserstein distance involves searching through all possible couplings between two cells, where each cell is treated as having total unit mass. In this strictly mass-conserving framework, all the mass in the first cell must be paired exactly with mass in the second cell. Concretely, if two neurons are each modeled by a point cloud of 100 points, each point is assigned mass 0.01, and any valid coupling must pair the entire 0.01 mass from each point in one neuron with 0.01 mass distributed across the points in the other neuron.\n",
"The definition of Gromov–Wasserstein distance involves searching through all possible 'couplings' between two cells, where each cell is treated as having total unit mass. In this strictly mass-conserving framework, all the mass in the first cell must be paired exactly with mass in the second cell. Concretely, if two neurons are each modeled by a point cloud of 100 points, each point is assigned mass 0.01, and any valid coupling must pair the entire 0.01 mass from each point in one neuron with 0.01 mass distributed across the points in the other neuron.\n",
"\n",
"For example, suppose we have two neurons that are identical except for one additional dendrite in the second neuron. This extra dendrite is biologically meaningful, and considering embeddings of the first neuron into a portion of the second would capture important structural similarities. However, Gromov–Wasserstein does not recognize such partial embeddings as valid couplings, because it violates the requirement of strict conservation of mass: all mass from the first neuron must be paired with an equivalent total mass in the second neuron, leaving the extra dendrite unmatched. As a result, the optimal Gromov–Wasserstein transport plan would likely fail to reflect the structural equivalence between the first neuron and most of the second.\n",
"For example, suppose we have two neurons that are identical except for one additional dendrite in the second neuron. This extra dendrite is biologically meaningful, and considering embeddings of the first neuron into a portion of the second would capture important structural similarities. However, Gromov–Wasserstein does not recognize such partial embeddings as valid couplings, because it violates the requirement of strict 'conservation of mass': all mass from the first neuron must be paired with an equivalent total mass in the second neuron, leaving the extra dendrite unmatched. As a result, the optimal Gromov–Wasserstein transport plan would likely fail to reflect the structural equivalence between the first neuron and most of the second.\n",
"\n",
"The Unbalanced Gromov–Wasserstein distance allows such embeddings by permitting transport plans that create or destroy mass, at the cost of an additional penalty. The size of this penalty is controlled by a user-supplied parameter $\\rho$. When $\\rho$ is large, the solution remains close to a perfect coupling, but as $\\rho$ is reduced, the algorithm becomes more tolerant of deviations and allows looser fits. In their paper on Unbalanced Gromov–Wasserstein, Séjourné, Vialard, and Peyré provide several examples illustrating how this extra flexibility helps account for small differences between objects.\n",
"The Unbalanced Gromov–Wasserstein distance allows such embeddings by permitting transport plans that create or destroy mass, at the cost of an additional penalty. The size of this penalty is controlled by a user-supplied parameter $\\rho$. When $\\rho$ is large, the solution remains close to a 'perfect coupling,' but as $\\rho$ is reduced, the algorithm becomes more tolerant of deviations and allows looser fits. In their paper on Unbalanced Gromov–Wasserstein, Séjourné, Vialard, and Peyré provide several examples illustrating how this extra flexibility helps account for small differences between objects.\n",
"\n",
"Choosing a specific numerical value for $\\rho$ can be challenging because it is not immediately clear what order of magnitude \\rho should take to produce sensible results. Instead, we introduce a more intuitive and interpretable control parameter: a lower bound on the fraction of mass retained during alignment. Specifically, the user can set mass_kept=0.90 to ensure that, when two neurons are aligned, at least 90% of the points in both neurons remain matched, and at most 10% can be discarded to improve the fit.\n",
"Choosing a specific numerical value for $\\rho$ can be challenging because it is not immediately clear what order of magnitude $\\rho$ should take to produce sensible results. Instead, we introduce a more intuitive and interpretable control parameter: a lower bound on the fraction of mass retained during alignment. Specifically, the user can set mass_kept=0.90 to ensure that, when two neurons are aligned, at least 90% of the points in both neurons remain matched, and at most 10% can be discarded to improve the fit.\n",
"\n",
"Let us demonstrate how to use the implementation. We assume all the data is in folder `/home/jovyan`."
]
Expand Down

0 comments on commit b752149

Please sign in to comment.