From 4f660763e8270ff84aa5f1f273356fd331a9b607 Mon Sep 17 00:00:00 2001 From: Vincent Traag Date: Mon, 18 Mar 2024 10:21:59 +0100 Subject: [PATCH] doc: Correct escape of math. Fixes #173 --- src/leidenalg/Optimiser.py | 10 +++++----- src/leidenalg/VertexPartition.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/leidenalg/Optimiser.py b/src/leidenalg/Optimiser.py index 27e2c46a..b6c839e1 100644 --- a/src/leidenalg/Optimiser.py +++ b/src/leidenalg/Optimiser.py @@ -24,19 +24,19 @@ class Optimiser(object): algorithm that cannot be translated well in this framework: when merging subcommunities in the refinement procedure, it does not consider whether they are sufficiently well connected to the rest of the community. This - implementation therefore does not guarantee subpartition :math:`\gamma`-density. + implementation therefore does not guarantee subpartition :math:`\\gamma`-density. However, all other guarantees still hold: After each iteration - 1. :math:`\gamma`-separation - 2. :math:`\gamma`-connectivity + 1. :math:`\\gamma`-separation + 2. :math:`\\gamma`-connectivity After a stable iteration 3. Node optimality 4. Some subsets are locally optimally assigned Asymptotically - 5. Uniform :math:`\gamma`-density + 5. Uniform :math:`\\gamma`-density 6. Subset optimality The optimiser class provides a number of different methods for optimising a @@ -349,7 +349,7 @@ def optimise_partition_multiplex(self, partitions, layer_weights=None, n_iterati layer :math:`k` and the weight by :math:`\\lambda_k`, the overall quality is then - .. math:: Q = \sum_k \\lambda_k Q_k. + .. math:: Q = \\sum_k \\lambda_k Q_k. This is particularly useful for graphs containing negative links. When separating the graph in two graphs, the one containing only the positive diff --git a/src/leidenalg/VertexPartition.py b/src/leidenalg/VertexPartition.py index 7e3d24f7..50372cfb 100644 --- a/src/leidenalg/VertexPartition.py +++ b/src/leidenalg/VertexPartition.py @@ -410,7 +410,7 @@ class ModularityVertexPartition(MutableVertexPartition): Note that for directed graphs a slightly different formulation is used, as proposed by Leicht and Newman [2]: - .. math:: Q = \\frac{1}{m} \\sum_{ij} \\left(A_{ij} - \\frac{k_i^\mathrm{out} k_j^\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j), + .. math:: Q = \\frac{1}{m} \\sum_{ij} \\left(A_{ij} - \\frac{k_i^\\mathrm{out} k_j^\\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j), where :math:`k_i^\\mathrm{out}` and :math:`k_i^\\mathrm{in}` refers to respectively the outdegree and indegree of node :math:`i`, and :math:`A_{ij}` @@ -785,7 +785,7 @@ class RBConfigurationVertexPartition(LinearResolutionParameterVertexPartition): Note that for directed graphs a slightly different formulation is used, as proposed by Leicht and Newman [2]: - .. math:: Q = \\sum_{ij} \\left(A_{ij} - \\gamma \\frac{k_i^\mathrm{out} k_j^\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j), + .. math:: Q = \\sum_{ij} \\left(A_{ij} - \\gamma \\frac{k_i^\\mathrm{out} k_j^\\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j), where :math:`k_i^\\mathrm{out}` and :math:`k_i^\\mathrm{in}` refers to respectively the outdegree and indegree of node :math:`i`, and :math:`A_{ij}`