---
title: "ArticleRank"
component: "graph-ml"
version: "3.10"
module: "centrality-algorithms"
html_url: "/graph-ml/3.10/centrality-algorithms/article-rank"
canonical_url: "https://www.tigergraph.com/docs/graph-ml/3.10/centrality-algorithms/article-rank"
markdown_url: "https://www.tigergraph.com/docs/graph-ml/3.10/centrality-algorithms/article-rank.md"
---

[View as HTML](https://www.tigergraph.com/docs/graph-ml/3.10/centrality-algorithms/article-rank)

# ArticleRank

Supported Graph Characteristics

| Unweighted edges |
| --- |
| Directed edges |
| Homogeneous vertex types |

Algorithm link: [Article Rank](https://github.com/tigergraph/gsql-graph-algorithms/tree/master/algorithms/Centrality/article%5Frank)

ArticleRank is an algorithm that has been derived from the PageRank algorithm to measure the influence of journal articles.

Page Rank assumes that relationships originating from low-degree vertices have a higher influence than relationships from high-degree vertices. Article Rank keeps the PageRank methodology but modifies the formula to lower the influence of low-degree nodes.

The Article Rank of a node \\(v\\) at iteration \\(i\\) is defined as:

\\\[ArticleRank\_i(v) = (1-d) + d \\sum\_{w\\in N\_{in}(v)} \\frac{ArticleRank\_{i-1}(w)}{|N\_{out}(w)| + \\overline{N\_{out}}}\\\]

Within the formula:

* \\(N\_{in}(v)\\) are the incoming neighbors and \\(N\_{out}(v)\\) are the outgoing neighbors of node \\(v\\).
* \\(d\\) is a damping factor in \[0, 1\], usually set to 0.85.
* \\(\\overline{N\_{out}}\\) is the average outdegree.

## Notes

For more information, see [ArticleRank: a PageRank‐based alternative to numbers of citations for analysing citation networks](https://www.emeraldinsight.com/doi/abs/10.1108/00012530911005544).

## Specifications

```gsql
CREATE QUERY tg_article_rank (STRING v_type, STRING e_type,
 FLOAT max_change=0.001, INT maximum_iteration=25, FLOAT damping=0.85, INT top_k = 100, BOOL print_results = TRUE, STRING result_attribute =  "", STRING file_path = "")
```

### Parameters

| Name | Description |
| --- | --- |
| `STRING v_type` | A vertex type. |
| `STRING e_type` | An edge type. |
| `FLOAT max_change` | Article Rank will stop iterating when the largest difference between any vertex's current score and its previous score ≤`max_change.` That is, the scores have become very stable and are changing by less than `max_change` from one iteration to the next. |
| `INT maximum_iteration` | Maximum number of iterations. |
| `FLOAT damping` | The damping factor. Usually set to 0.85. |
| `INT top_k` | The number of results with the highest scores to return. |
| `BOOL print_results` | If true, print JSON output. |
| `STRING result_attribute` | If not empty, store the article rank score of each vertex in this attribute. |
| `STRING file_path` | If not empty, write output to this file. |

### Output

Returns the article rank score for each vertex in descending order.

### Result size

The result size is equal to \\(V\\), the number of vertices, because one score is produced for every vertex in the graph.

### Time complexity

The algorithm has a time complexity of \\(O(E\*k)\\), where \\(E\\) is the number of edges and \\(k\\) is the number of iterations.

The number of iterations is data-dependent, but the user can set a maximum. Parallel processing reduces the time needed for computation.

### Run commands

#### Schema-Free Query

```gsql
RUN QUERY tg_article_rank (<parameters>)
```

#### Packaged Template Query

```gsql
CALL GDBMS_ALGO.centrality.article_rank (<parameters>)
```

## **Example**

Suppose we have the following graph:

![article rank ex](https://www.tigergraph.com/docs/graph-ml/3.10/centrality-algorithms/_images/article-rank-ex.png) 

By running Article Rank on the graph, we will see that the vertex with the highest score is Dan:

* Query
* Result

```gsql
RUN QUERY tg_article_rank ("person", "friendship", _, _, _, _, _)
```

```json
{
  "error": false,
  "message": "",
  "version": {
    "schema": 2,
    "edition": "enterprise",
    "api": "v2"
  },
  "results": [{"@@topScores": [
    {
      "score": 2348294.75,
      "Vertex_ID": "Dan"
    },
    {
      "score": 1863160.625,
      "Vertex_ID": "Jenny"
    },
    {
      "score": 1442890.5,
      "Vertex_ID": "Tom"
    },
    {
      "score": 1053484.625,
      "Vertex_ID": "Nancy"
    },
    {
      "score": 739327.9375,
      "Vertex_ID": "Kevin"
    },
    {
      "score": 703562.75,
      "Vertex_ID": "Amily"
    },
    {
      "score": 498013.25,
      "Vertex_ID": "Jack"
    }
  ]}]
}
```
