PageRank
Introduction
PageRank is an algorithm used to measure the relative importance of nodes in a graph based on their connections.
Output
The algorithm produces the following fields:
Field Name | Description |
---|---|
id | The ID of the vertex (node) |
score | The PageRank score of the vertex (node) |
Query Example
Parameters
Name | Description | Required | Default Value |
---|---|---|---|
labels | Specifies the node labels to include in the algorithm | Yes | |
relationshipTypes | Specifies the relationship types to include | Yes | |
maxIterations | Maximum number of iterations | No | 30 |
relationshipWeightProperty | Defines the property name representing edge weights | No | |
dampingFactor | Factor representing the probability of continuing along links | No | 0.85 |
tolerance | Minimum edge weight value for it to be included in the algorithm | No | 1e-7 |
Method | Description | Required | Default Value |
---|---|---|---|
vertices(String... names) | Specifies the vertex labels to include | Yes | |
edges(String... names) | Specifies the edge labels to include | Yes | |
maxIteration(int n) | Sets the maximum number of iterations | No | 30 |
setParams(Object... args) | Adds additional parameters using alternating keys and values | No | see below |
Additional parameter keys in setParams
Key | Description | Default Value |
---|---|---|
weight | Specifies the edge weight property or a constant value as weight | 1.0 |
dampingFactor | Factor representing the probability of continuing along links | 0.85 |
tolerance | Minimum edge weight value for it to be included in the algorithm | 1e-7 |
Exporting Query Results
For large datasets, export the results to object storage: