Skip to content

Adarsh2801-r/Page-Ranking-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page-Ranking of Web graph

The PageRank algorithm is implemented with and without random teleportations using the following two methods –
A. Finding the principal left eigenvector of the probability transition matrix directly i.e., by making use of numerical linear algebra packages
B. Finding the principal left eigenvector of the probability transition matrix Power Iteration method.
Random Teleportations Hyper parameter: Teleportation to a random page with probability of 0.1

Running the code

The code can be either run as ipynb file from Jupyter Notebook / as .py file from terminal

Input :
N: Number of nodes
E: Number of edges
Edge list (E edges each between a pair of nodes)

Steps to run:

  1. After giving the input, call the function prob_transition_matrix(adj_matrix,alpha) which takes adjacency matrix and teleportation parameter (alpha) as input
  2. a) Set alpha = 0 to run the algorithm without random teleportation
    b) Set alpha > 0 to run the algorithm with random teleportation
  3. Run the algorithm with both methods : numerical linear algebra and power iteration method

Running Time Analysis

image

The above plot shows edgelist size Vs Running time for the power iteration method of the algorithm. We see that running time of the algorithm increases steadily , with increase in edge list size.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published