Network Science Metrics
algo.assortativity
| Property | Value |
|---|---|
Procedure |
|
Category |
Network Science |
Complexity |
CPU |
Min Args |
0 |
Max Args |
1 |
Syntax
CALL algo.assortativity([relTypes])
YIELD assortativity, edgeCount
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
|
String |
No |
all types |
Comma-separated relationship types |
Yield Fields
| Field | Type | Description |
|---|---|---|
|
Double |
Newman’s degree assortativity coefficient ∈ [-1, 1] |
|
Integer |
Number of edges used in the computation |
Description
Computes Newman’s degree assortativity coefficient. A positive value indicates that high-degree nodes tend to connect to other high-degree nodes (assortative); negative indicates disassortative mixing.
Use Cases
-
Network topology characterization
-
Social network analysis (social networks are typically assortative)
-
Comparing mixing patterns across different networks
Example
CALL algo.assortativity('KNOWS')
YIELD assortativity, edgeCount
RETURN assortativity, edgeCount
References
-
Newman, M. E. J. (2002). Assortative mixing in networks. Physical Review Letters, 89(20), 208701.
algo.richClub
| Property | Value |
|---|---|
Procedure |
|
Category |
Network Science |
Complexity |
CPU |
Min Args |
0 |
Max Args |
2 |
Syntax
CALL algo.richClub([relTypes, minDegree])
YIELD degree, richClubCoefficient, nodeCount, edgeCount
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
|
String |
No |
all types |
Comma-separated relationship types |
|
Integer |
No |
|
Starting degree threshold |
Yield Fields
| Field | Type | Description |
|---|---|---|
|
Integer |
Degree threshold k for this row |
|
Double |
φ(k): density of edges among nodes with degree > k |
|
Integer |
Number of nodes with degree > k |
|
Integer |
Number of edges among those nodes |
Description
Computes the rich-club coefficient φ(k) for every degree threshold k from minDegree to the maximum degree in the graph. One row is returned per degree threshold. Formula: φ(k) = 2·E_k / (N_k·(N_k−1)), where N_k = number of nodes with degree > k and E_k = edges between those nodes.
Use Cases
-
Characterizing the "rich get richer" phenomenon
-
Network topology analysis: do high-degree nodes interconnect?
-
Comparing network structure across domains
Example
CALL algo.richClub('KNOWS', 2)
YIELD degree, richClubCoefficient, nodeCount, edgeCount
RETURN degree, richClubCoefficient ORDER BY degree ASC
References
-
Colizza, V., Flammini, A., Serrano, M. A., & Vespignani, A. (2006). Detecting rich-club ordering in complex networks. Nature Physics, 2, 110–115.
algo.influenceMaximization
| Property | Value |
|---|---|
Procedure |
|
Category |
Network Science |
Complexity |
CPU |
Min Args |
1 |
Max Args |
4 |
Syntax
CALL algo.influenceMaximization(k [, relTypes, simulations, propagationProbability])
YIELD nodeId, rank, marginalGain
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
|
Integer |
Yes |
— |
Number of seed nodes to select |
|
String |
No |
all types |
Comma-separated relationship types |
|
Integer |
No |
|
Monte Carlo simulation count per candidate |
|
Double |
No |
|
Independent Cascade activation probability per edge |
Yield Fields
| Field | Type | Description |
|---|---|---|
|
RID |
Vertex identity of the selected seed node |
|
Integer |
Selection rank (1 = best seed) |
|
Double |
Expected additional nodes activated by adding this seed |
Description
Selects k seed nodes that maximize influence spread using a greedy algorithm with Monte Carlo simulation of the Independent Cascade (IC) model. In each round, the candidate that maximizes the expected spread when added to the current seed set is selected.
Use Cases
-
Viral marketing campaign planning
-
Identifying optimal vaccination targets for epidemic control
-
Information cascade maximization in social media
Example
CALL algo.influenceMaximization(3, 'FOLLOWS', 200, 0.15)
YIELD nodeId, rank, marginalGain
RETURN nodeId, rank, marginalGain ORDER BY rank ASC
References
-
Kempe, D., Kleinberg, J., & Tardos, E. (2003). Maximizing the spread of influence through a social network. KDD 2003.