Skip to content

Commit ea11206

Browse files
committed
Centrality mutate docstrings
1 parent 381a5e7 commit ea11206

File tree

9 files changed

+43
-9
lines changed

9 files changed

+43
-9
lines changed

graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ def mutate(
3636
source_nodes: Optional[Any] = None,
3737
) -> ArticleRankMutateResult:
3838
"""
39-
Executes the ArticleRank algorithm and writes the results back to the graph as a node property.
39+
Runs the Article Rank algorithm and stores the results in the graph catalog as a new node property.
40+
41+
ArticleRank is a variant of the Page Rank algorithm, which measures the transitive influence of nodes.
42+
Page Rank follows the assumption that relationships originating from low-degree nodes have a higher influence than relationships from high-degree nodes.
43+
Article Rank lowers the influence of low-degree nodes by lowering the scores being sent to their neighbors in each iteration.
4044
4145
Parameters
4246
----------

graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def mutate(
2828
job_id: Optional[Any] = None,
2929
) -> "ArticulationPointsMutateResult":
3030
"""
31-
Executes the ArticulationPoints algorithm and writes the results to the in-memory graph as node properties.
31+
Runs the Articulation Points algorithm and stores the results in the graph catalog as a new node property.
32+
33+
Given a graph, an articulation point is a node whose removal increases the number of connected components in the graph.
34+
The Neo4j GDS Library provides an efficient linear time sequential algorithm to compute all articulation points in a graph.
3235
3336
Parameters
3437
----------

graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ def mutate(
3333
relationship_weight_property: Optional[str] = None,
3434
) -> BetweennessMutateResult:
3535
"""
36-
Executes the Betweenness Centrality algorithm and returns result statistics without persisting the results
36+
Runs the Betweenness Centrality algorithm and stores the results in the graph catalog as a new node property.
37+
38+
Betweenness centrality is a way of detecting the amount of influence a node has over the flow of information in a graph.
39+
It is often used to find nodes that serve as a bridge from one part of a graph to another.
40+
The algorithm calculates shortest paths between all pairs of nodes in a graph.
41+
Each node receives a score, based on the number of shortest paths that pass through the node.
3742
3843
Parameters
3944
----------

graphdatascience/procedure_surface/api/centrality/celf_endpoints.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def mutate(
3737
job_id: Optional[Any] = None,
3838
) -> CelfMutateResult:
3939
"""
40-
Executes the CELF algorithm and writes the results to the in-memory graph as node properties.
40+
Runs the CELF algorithm and stores the results in the graph catalog as a new node property.
41+
42+
The influence maximization problem asks for a set of k nodes that maximize the expected spread of influence in the network.
4143
4244
Parameters
4345
----------

graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ def mutate(
3535
job_id: Optional[Any] = None,
3636
) -> ClosenessMutateResult:
3737
"""
38-
Executes the Closeness Centrality algorithm and writes the results to the in-memory graph as node properties.
38+
Runs the Closeness Centrality algorithm and stores the results in the graph catalog as a new node property.
39+
40+
Closeness centrality is a way of detecting nodes that are able to spread information very efficiently through a graph.
41+
The closeness centrality of a node measures its average farness (inverse distance) to all other nodes.
42+
Nodes with a high closeness score have the shortest distances to all other nodes.
3943
4044
Parameters
4145
----------

graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ def mutate(
3434
job_id: Optional[Any] = None,
3535
) -> ClosenessHarmonicMutateResult:
3636
"""
37-
Executes the Harmonic Closeness Centrality algorithm and writes the results to the in-memory graph as node properties.
37+
Runs the Harmonic Centrality algorithm and stores the results in the graph catalog as a new node property.
38+
39+
Harmonic centrality (also known as valued centrality) is a variant of closeness centrality, that was invented to
40+
solve the problem the original formula had when dealing with unconnected graphs.
3841
3942
Parameters
4043
----------

graphdatascience/procedure_surface/api/centrality/degree_endpoints.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ def mutate(
3636
relationship_weight_property: Optional[str] = None,
3737
) -> DegreeMutateResult:
3838
"""
39-
Executes the Degree Centrality algorithm and writes the results to the in-memory graph as node properties.
39+
Runs the Degree Centrality algorithm and stores the results in the graph catalog as a new node property.
40+
41+
The Degree Centrality algorithm can be used to find popular nodes within a graph.
42+
The degree centrality measures the number of incoming or outgoing (or both) relationships from a node, which can be defined by the orientation of a relationship projection.
43+
It can be applied to either weighted or unweighted graphs.
44+
In the weighted case the algorithm computes the sum of all positive weights of adjacent relationships of a node, for each node in the graph.
4045
4146
Parameters
4247
----------

graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def mutate(
4040
job_id: Optional[Any] = None,
4141
) -> EigenvectorMutateResult:
4242
"""
43-
Executes the Eigenvector Centrality algorithm and writes the results to the in-memory graph as node properties.
43+
Runs the Eigenvector Centrality algorithm and stores the results in the graph catalog as a new node property.
44+
45+
Eigenvector Centrality is an algorithm that measures the transitive influence of nodes.
46+
Relationships originating from high-scoring nodes contribute more to the score of a node than connections from low-scoring nodes.
47+
A high eigenvector score means that a node is connected to many nodes who themselves have high scores.
48+
The algorithm computes the eigenvector associated with the largest absolute eigenvalue.
4449
4550
Parameters
4651
----------

graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ def mutate(
3636
source_nodes: Optional[Any] = None,
3737
) -> PageRankMutateResult:
3838
"""
39-
Executes the PageRank algorithm and writes the results to the in-memory graph as node properties.
39+
Runs the PageRank algorithm and stores the results in the graph catalog as a new node property.
40+
41+
The PageRank algorithm measures the importance of each node within the graph, based on the number of incoming relationships and the importance of the corresponding source nodes.
42+
The underlying assumption roughly speaking is that a page is only as important as the pages that link to it.
4043
4144
Parameters
4245
----------

0 commit comments

Comments
 (0)