systematic-chaos / page-rank

PageRank algorithm implementation, with the specific purpose of cross-calculating marks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PageRank

Implementation of the PageRank algorith for the calculation of marks.
The program is executed from the command line receiving as an argument the name of a file which contains a square matrix with the numeric values that each group assigns as each of the other groups' mark, as well as its own self-assigned mark. The program follows the model of the PageRank algorithm, with the except of the calculation of the number of output links for each of the nodes. Since the marks matrix describes a complete graph, a direct application of the standard PageRank algorithm makes no sense. Instead of it, this model considers that each node has a number of links to another node whose value equals the numeric note assigned to the second node by the first one. On a similar way, in the stage where the total number of output links for a node is to be calculated, this value is considered to be the sum of the numeric marks such a node assigns to the others. The situation of convergence is taken as that when a number of iterations of the algorithm not smaller than log(n) have completed, having N as the dimension of the marks matrix. Since the PageRank algorithm includes a normalization mechanism, according to which the sum of the ranks of all the nodes will always sum 1, the rank of each node is taken as the proportion in which such a node contributes in the calculation of the final mark. Thus, the final mark of a group A will be the summation of the mark assigned to it by each group B, multiplied by the rank score of group B, for every group in the marks matrix.

About

PageRank algorithm implementation, with the specific purpose of cross-calculating marks


Languages

Language:Python 100.0%