PageRank
The PageRank algorithm ranks the nodes in a graph by their relative importance or influence. PageRank determines each node's ranking by identifying the number of links to the node and the quality of the links. The quality of a link is determined by the importance (PageRank) of the node that presents the outbound link.
PageRank Syntax
Graph algorithms are accessed from an internal SPARQL service endpoint. To incorporate the PageRank algorithm in a query, include a SERVICE statement in the WHERE clause. The service call specifies the name of the algorithm and defines the required and optional property values for that algorithm.
Use the following syntax to compute the PageRank for nodes in a graph. The table below describes each property.
SERVICE <csi:page_rank> { [] <csi:binding-vertex> ?vertex_variable_name ; <csi:binding-rank> ?rank_variable_name ; <csi:edge-label> <edge_uri> ; [ <csi:max-iterations> number_of_iterations ; ] [ <csi:err-tolerance> tolerance_number ; ] [ <csi:damping-factor> double_value ; ] [ <csi:normalized> boolean_value ] }
Property | Description | Range & Default Value |
---|---|---|
<csi:binding-vertex> | Required property that defines the name to use for the column in the results that lists the source nodes or vertices. | Range: Must be a variable name Default: none |
<csi:binding-rank> | Required property that defines the name to use for the column in the results that lists the computed PageRank values. | Range: Must be a variable name Default: none |
<csi:edge-label> | Required property that lists the edge URI that defines the graph to operate on. The graph is the set of vertices that are connected by this URI. | Range: Must be a URI Default: none |
<csi:max-iterations> | Optional property that specifies the maximum number of times to iterate through the graph to adjust approximate PageRank values. | Range: 1 - 100 Default: 50 |
<csi:err-tolerance> | Optional property that specifies the error tolerance to use. If the sum of the error values for all nodes is below this tolerance value, AnzoGraph stops PageRank iterations. | Range: 0.0 - 0.1 Default: 1e-8 |
<csi:damping-factor> | Optional property that specifies the edge traversal probability. When used for analyzing website data, such as when Google ranks search results, the damping factor represents click-through probability. The damping-factor value is subtracted from 1.0 in the calculation. | Range: 0.0 - 1.0 Default: 0.85 |
<csi:normalized> | Optional property that specifies whether to produce PageRank values that are between 0 and 1. | Range: true or false Default: false |