Skip to content

Commit 54e23de

Browse files
committed
fix: sentence case - final commit for GSoC2025
1 parent 933df71 commit 54e23de

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

doc/source/community_detection_guide/notebooks/community_detection_algorithms.ipynb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
"\n",
3535
"The Leiden algorithm is applied in similar scenarios to Louvain, but it is often preferred when:\n",
3636
"\n",
37-
"- _Guaranteed Connected Communities are Crucial:_ If it's essential that the identified communities are internally connected graphs (meaning all nodes within a community can reach each other through paths within that community), Leiden is the algorithm of choice.\n",
37+
"- _Guaranteed connected communities are crucial:_ If it's essential that the identified communities are internally connected graphs (meaning all nodes within a community can reach each other through paths within that community), Leiden is the algorithm of choice.\n",
3838
"\n",
39-
"- _Higher Quality Partitions are Desired:_ Research has shown that Leiden generally produces partitions with higher modularity values and is more stable in its results compared to Louvain ([Traag, Waltman, & van Eck, 2019](https://doi.org/10.1038/s41598-019-41695-z)).\n",
39+
"- _Higher quality partitions are desired:_ Research has shown that Leiden generally produces partitions with higher modularity values and is more stable in its results compared to Louvain ([Traag, Waltman, & van Eck, 2019](https://doi.org/10.1038/s41598-019-41695-z)).\n",
4040
"\n",
41-
"- _Analyzing Large and Complex Networks:_ Like Louvain, Leiden is designed for scalability and efficiency on large networks.\n",
41+
"- _Analyzing large and complex networks:_ Like Louvain, Leiden is designed for scalability and efficiency on large networks.\n",
4242
"\n",
43-
"- _Addressing the \"Resolution Limit\" (to some extent):_ While both Louvain and Leiden optimize modularity, and __modularity__, known to suffer from the _resolution limit_ — the tendency to favor larger communities at the expense of smaller, yet structurally significant ones. Leiden's refinement step can help mitigate this by ensuring that smaller, truly cohesive sub-communities are not artificially merged into larger, weakly connected ones. The Leiden algorithm's implementation also allow for a _resolution_parameter_ (often denoted as γ) to explicitly control the granularity of the communities detected.\n",
43+
"- _Addressing the \"resolution limit\" (to some extent):_ While both Louvain and Leiden optimize modularity, and __modularity__, known to suffer from the _resolution limit_ — the tendency to favor larger communities at the expense of smaller, yet structurally significant ones. Leiden's refinement step can help mitigate this by ensuring that smaller, truly cohesive sub-communities are not artificially merged into larger, weakly connected ones. The Leiden algorithm's implementation also allow for a _resolution_parameter_ (often denoted as γ) to explicitly control the granularity of the communities detected.\n",
4444
"\n",
4545
" - γ > 1: Leads to more, smaller, and well-connected communities.\n",
4646
"\n",
@@ -79,13 +79,13 @@
7979
"\n",
8080
"The Edge Betweenness (Girvan-Newman) algorithm is typically applied when:\n",
8181
"\n",
82-
"- _Identifying \"Bridge\" Edges is Key:_ The fundamental idea behind edge betweenness for community detection is that edges connecting different communities will have a high betweenness centrality because many shortest paths between nodes in separate communities must pass through them. Therefore, it's used when the goal is to pinpoint and remove these inter-community \"bottleneck\" connections to reveal the underlying groups.\n",
82+
"- _Identifying \"bridge\" edges is key:_ The fundamental idea behind edge betweenness for community detection is that edges connecting different communities will have a high betweenness centrality because many shortest paths between nodes in separate communities must pass through them. Therefore, it's used when the goal is to pinpoint and remove these inter-community \"bottleneck\" connections to reveal the underlying groups.\n",
8383
"\n",
84-
"- _For a Divisive Approach to Community Detection:_ Unlike algorithms that build communities up (agglomerative), community_edge_betweenness employs a \"top-down\" or \"divisive\" strategy. It iteratively removes the most central \"bridge\" edges, causing the network to naturally break apart into its constituent communities. This is useful when you want to understand how communities are _separated_ rather than how they are _formed_.\n",
84+
"- _For a divisive approach to community detection:_ Unlike algorithms that build communities up (agglomerative), community_edge_betweenness employs a \"top-down\" or \"divisive\" strategy. It iteratively removes the most central \"bridge\" edges, causing the network to naturally break apart into its constituent communities. This is useful when you want to understand how communities are _separated_ rather than how they are _formed_.\n",
8585
"\n",
86-
"- _To Understand Hierarchical Community Structure:_ A significant strength of this method is that it intrinsically generates a hierarchical decomposition of the network. As edges are progressively removed, you can observe the community structure at different levels of granularity – from a few large communities to many smaller ones. This makes it ideal for analyses where understanding the nested relationships between groups is important, often visualized as a dendrogram.\n",
86+
"- _To understand hierarchical community structure:_ A significant strength of this method is that it intrinsically generates a hierarchical decomposition of the network. As edges are progressively removed, you can observe the community structure at different levels of granularity – from a few large communities to many smaller ones. This makes it ideal for analyses where understanding the nested relationships between groups is important, often visualized as a dendrogram.\n",
8787
"\n",
88-
"- _For Moderate-Sized Networks (or when computational resources allow for larger ones):_ A key consideration is the computational cost. Calculating and recalculating edge betweenness after each edge removal can be computationally intensive, especially for very large networks (it has a high time complexity, often cited as O(MN2) or O(N3) in dense graphs, where N is the number of nodes and M is the number of edges). Therefore, it's often more practical for small to medium-sized networks, or when approximate versions are available or high-performance computing resources can be leveraged.\n",
88+
"- _For moderate-sized networks (or when computational resources allow for larger ones):_ A key consideration is the computational cost. Calculating and recalculating edge betweenness after each edge removal can be computationally intensive, especially for very large networks (it has a high time complexity, often cited as O(MN2) or O(N3) in dense graphs, where N is the number of nodes and M is the number of edges). Therefore, it's often more practical for small to medium-sized networks, or when approximate versions are available or high-performance computing resources can be leveraged.\n",
8989
"\n",
9090
"## __Other methods__\n",
9191
"\n",
@@ -122,7 +122,7 @@
122122
"\n",
123123
"#### When is community_fluid_communities applied?\n",
124124
"\n",
125-
"The Fluid Communities algorithm is typically applied when:\n",
125+
"The Fluid communities algorithm is typically applied when:\n",
126126
"\n",
127127
"- _Looking for communities based on \"flow\" and \"attraction\" in a dynamic sense:_ The algorithm models communities as fluids that flow through the network, expanding or contracting based on the influence of their neighbors. This is particularly useful when the concept of nodes \"attracting\" or \"pulling\" others into their community makes intuitive sense for the network.\n",
128128
"\n",
@@ -139,13 +139,13 @@
139139
"\n",
140140
"The Label Propagation Algorithm (LPA) is typically applied when:\n",
141141
"\n",
142-
"- _Analyzing Very Large Networks:_ LPA is highly valued for its exceptional computational efficiency, often achieving near-linear time complexity (O(M) or O(N) for sparse graphs, where M is edges and N is nodes). This makes it one of the most practical algorithms for community detection in massive graphs (e.g., social networks with millions of users, large web graphs, extensive biological networks) where more complex or iterative algorithms (like Girvan-Newman) become prohibitively slow.\n",
142+
"- _Analyzing very large networks:_ LPA is highly valued for its exceptional computational efficiency, often achieving near-linear time complexity (O(M) or O(N) for sparse graphs, where M is edges and N is nodes). This makes it one of the most practical algorithms for community detection in massive graphs (e.g., social networks with millions of users, large web graphs, extensive biological networks) where more complex or iterative algorithms (like Girvan-Newman) become prohibitively slow.\n",
143143
"\n",
144-
"- _When a Fast, Initial Community Partition is Needed:_ Due to its speed, LPA is often used to get a quick first look at the community structure of a network. It can serve as a rapid baseline for comparison with other algorithms or as a preliminary step in a more complex analysis pipeline.\n",
144+
"- _When a fast, initial community partition is needed:_ Due to its speed, LPA is often used to get a quick first look at the community structure of a network. It can serve as a rapid baseline for comparison with other algorithms or as a preliminary step in a more complex analysis pipeline.\n",
145145
"\n",
146-
"- _When Simplicity and Interpretability of the Core Mechanism are Valued:_ The underlying principle of labels propagating and consolidating within dense regions is intuitive. For applications where a straightforward, graph-driven clustering method is preferred over complex optimization functions, LPA is a strong candidate.\n",
146+
"- _When simplicity and interpretability of the core mechanism are valued:_ The underlying principle of labels propagating and consolidating within dense regions is intuitive. For applications where a straightforward, graph-driven clustering method is preferred over complex optimization functions, LPA is a strong candidate.\n",
147147
"\n",
148-
"- _When Non-Overlapping Communities are Acceptable (or Required):_ The basic LPA assigns each node to exactly one community. If your domain or problem requires distinct, mutually exclusive groups, LPA naturally provides this. (_Note:_ Variants exist for overlapping communities, but the standard LPA does not produce them.)\n"
148+
"- _When non-overlapping communities are acceptable (or required):_ The basic LPA assigns each node to exactly one community. If your domain or problem requires distinct, mutually exclusive groups, LPA naturally provides this. (_Note:_ Variants exist for overlapping communities, but the standard LPA does not produce them.)\n"
149149
]
150150
},
151151
{
@@ -285,7 +285,7 @@
285285
"data": {
286286
"text/html": [
287287
"<!--| quarto-html-table-processing: none -->\n",
288-
"<table id=\"itables_2086ef8c_9ee2_4b2c_9427_c3e259664091\"><tbody><tr>\n",
288+
"<table id=\"itables_29afd656_1a0c_453f_99c7_fd2274d2c8e8\"><tbody><tr>\n",
289289
" <td style=\"vertical-align:middle; text-align:left\">\n",
290290
" <a href=https://mwouts.github.io/itables/><svg class=\"main-svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n",
291291
"width=\"64\" viewBox=\"0 0 500 400\" style=\"font-family: 'Droid Sans', sans-serif;\">\n",
@@ -383,11 +383,11 @@
383383
"<script type=\"module\">\n",
384384
" const { ITable, jQuery: $ } = await import(window._datatables_src_for_itables_2_4_4);\n",
385385
"\n",
386-
" document.querySelectorAll(\"#itables_2086ef8c_9ee2_4b2c_9427_c3e259664091:not(.dataTable)\").forEach(table => {\n",
386+
" document.querySelectorAll(\"#itables_29afd656_1a0c_453f_99c7_fd2274d2c8e8:not(.dataTable)\").forEach(table => {\n",
387387
" if (!(table instanceof HTMLTableElement))\n",
388388
" return;\n",
389389
"\n",
390-
" let dt_args = {\"scrollY\": \"300px\", \"scrollCollapse\": true, \"fixedColumns\": true, \"pageLength\": -1, \"layout\": {\"topStart\": \"pageLength\", \"topEnd\": \"search\", \"bottomStart\": \"info\", \"bottomEnd\": \"paging\"}, \"text_in_header_can_be_selected\": true, \"classes\": [\"display\", \"nowrap\"], \"style\": {\"table-layout\": \"auto\", \"width\": \"auto\", \"margin\": \"auto\", \"caption-side\": \"bottom\"}, \"order\": [], \"table_html\": \"<table><thead>\\n <tr style=\\\"text-align: right;\\\">\\n \\n <th>Method</th>\\n <th>Function in igraph (Python)</th>\\n <th>Directed Graph Support</th>\\n <th>Weighted Graph Support</th>\\n <th>Signed Graph Support</th>\\n <th>Sparse Graph Performance</th>\\n <th>Dense Graph Performance</th>\\n <th>Deterministic</th>\\n </tr>\\n </thead></table>\", \"data_json\": \"[[\\\"Edge Betweenness\\\", \\\"`Graph.community_edge_betweenness()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c (Slow for large)\\\", \\\"\\\\u2705\\\"], [\\\"Fast-Greedy\\\", \\\"`Graph.community_fastgreedy()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705 (Very efficient)\\\", \\\"\\\\u2705 (Can handle)\\\", \\\"\\\\u274c\\\"], [\\\"Fluid Communities\\\", \\\"`Graph.community_fluid_communities()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u274c (weights ignored)\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Infomap\\\", \\\"`Graph.community_infomap()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Label Propagation\\\", \\\"`Graph.community_label_propagation()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Leading Eigenvector\\\", \\\"`Graph.community_leading_eigenvector()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\"], [\\\"Leiden\\\", \\\"`Graph.community_leiden()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Louvain (Multilevel)\\\", \\\"`Graph.community_multilevel()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Spinglass\\\", \\\"`Graph.community_spinglass()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c (Slower)\\\", \\\"\\\\u274c\\\"], [\\\"Walktrap\\\", \\\"`Graph.community_walktrap()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\"], [\\\"Optimal Modularity\\\", \\\"`Graph.community_optimal_modularity()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u274c (Small graphs only)\\\", \\\"\\\\u274c (Small graphs only)\\\", \\\"\\\\u2705\\\"], [\\\"Voronoi\\\", \\\"`Graph.community_voronoi()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\"]]\"};\n",
390+
" let dt_args = {\"scrollY\": \"300px\", \"scrollCollapse\": true, \"fixedColumns\": true, \"pageLength\": -1, \"layout\": {\"topStart\": \"pageLength\", \"topEnd\": \"search\", \"bottomStart\": \"info\", \"bottomEnd\": \"paging\"}, \"style\": {\"table-layout\": \"auto\", \"width\": \"auto\", \"margin\": \"auto\", \"caption-side\": \"bottom\"}, \"order\": [], \"text_in_header_can_be_selected\": true, \"classes\": [\"display\", \"nowrap\"], \"table_html\": \"<table><thead>\\n <tr style=\\\"text-align: right;\\\">\\n \\n <th>Method</th>\\n <th>Function in igraph (Python)</th>\\n <th>Directed Graph Support</th>\\n <th>Weighted Graph Support</th>\\n <th>Signed Graph Support</th>\\n <th>Sparse Graph Performance</th>\\n <th>Dense Graph Performance</th>\\n <th>Deterministic</th>\\n </tr>\\n </thead></table>\", \"data_json\": \"[[\\\"Edge Betweenness\\\", \\\"`Graph.community_edge_betweenness()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c (Slow for large)\\\", \\\"\\\\u2705\\\"], [\\\"Fast-Greedy\\\", \\\"`Graph.community_fastgreedy()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705 (Very efficient)\\\", \\\"\\\\u2705 (Can handle)\\\", \\\"\\\\u274c\\\"], [\\\"Fluid Communities\\\", \\\"`Graph.community_fluid_communities()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u274c (weights ignored)\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Infomap\\\", \\\"`Graph.community_infomap()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Label Propagation\\\", \\\"`Graph.community_label_propagation()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Leading Eigenvector\\\", \\\"`Graph.community_leading_eigenvector()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\"], [\\\"Leiden\\\", \\\"`Graph.community_leiden()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Louvain (Multilevel)\\\", \\\"`Graph.community_multilevel()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\"], [\\\"Spinglass\\\", \\\"`Graph.community_spinglass()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c (Slower)\\\", \\\"\\\\u274c\\\"], [\\\"Walktrap\\\", \\\"`Graph.community_walktrap()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\"], [\\\"Optimal Modularity\\\", \\\"`Graph.community_optimal_modularity()`\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u274c (Small graphs only)\\\", \\\"\\\\u274c (Small graphs only)\\\", \\\"\\\\u2705\\\"], [\\\"Voronoi\\\", \\\"`Graph.community_voronoi()`\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u274c\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\", \\\"\\\\u2705\\\"]]\"};\n",
391391
" new ITable(table, dt_args);\n",
392392
" });\n",
393393
"</script>\n"

0 commit comments

Comments
 (0)