Page Rank Algorithm and Implementation in python
PageRank (PR) is an algorithm that Google uses to rank web pages based on the links pointing to them. It was developed by Google’s founders, Larry Page and Sergey Brin, at Stanford University in 1996.
How Page Rank Works
Page rank is a measure of how important a web page is based on the votes of other web pages.
A link from one page to another is a sign of endorsement. The more links a page receives, the higher its value.
The more links a page gives, the more influence it has. This concept is also called Backlink count.
Page rank is calculated by considering both the quantity and quality of links.
Explanation of Page Rank Algorithm
Let’s say we have three pages A, B and C. Where,
1. A linked to B and C
2. B linked to C
3. C linked to A
Calculate Page Rank:
Final Page Rank of a page is determined after many more iterations. Now what is happening at each iteration?
Note: Keeping standard damping factor = 0.85 at initial stage assume page rank of all page is equal to 1.
Let’s calculate page rank of Page A for first iteration.
Iteration 1 : Page Rank for Page A
PR(A) = (1-d) + d[PR(C)/C(C)] # As only Page C is linked to page A
= (1–0.85) + 0.85[1/1] # Number of outbound link of Page C = 1(only to A)
= 0.15 + 0.85
= 1
Full Python code with explanation tutorial: Page Rank Algorithm and Implementation in python.