Computing a node’s degree with GDS
We have studied the node degree metric and its distribution in the preceding chapter, Chapter 3, Characterizing a Graph Dataset. At that time, we computed the node’s degree using a Cypher query. GDS provides a procedure to perform the same computation, on a projected graph. We are now going to use this procedure, whose results are well known, in order to understand the different algorithm modes and configuration options.
All algorithm procedures from GDS use the same syntax:
gds.<algoName>.<executionMode>(<graphName>, <algoConfiguration>)
Here, the following applies:
algoName
is the name of the algorithm. Note that some algorithms are included in an alpha or beta version, in which case they are accessible viagds.alpha.<algoName>
orgds.beta.<algoName>
.executionMode
is one ofstream
,write
,mutate
,estimate
orstats
, as defined in the GDS project workflow section.graphName...