Matlab code for the PageRank computation experiments
1. PageRank computation
iteratePageRank.m: one iteration of PageRank computation
loadSBMatrix.m: load Stanford-Berkeley web graph into Matlab
loadStanfordMatrix.m: load Stanford web graph into Matlab
normalize.m: normalized each row of the web graph matrix
pageRank.m: calculate PageRank for a web graph
pageRank100iterations.m: repeat the computation of the PageRank for 100 times on the first 6834 pages (first 1 percent) of Stanford-Berkeley web graph
pageRank100iterations_stanford.m: repeat the computation of the PageRank for 100 times on the first 2819 pages (first 1 percent) of Stanford web graph
pageRank100iterationsvariation.m: compute PageRank value variation on the results got from pageRank100iterations.m
pageRank100iterationsvariation_stanford.m: compute PageRank value variation on the results got from pageRank100iterations_stanford.m
pageRankalliterations.m: compute PageRank for a web graph and keep the PageRank value in a vector after each iteration is done
printIteration.m: print out what iteration we are on
residual.m: compute L1 residual on two vectors
2. PageRank value convergence rate v.s. size of web graph
comparecurve.m: draw PageRank value stability curves for two web graphs (Stanford and Stanford-Berkeley) with percentage of whole page set as X-axis and PageRank value averaged variation as Y-axis. Tolerance is set to 10^-8.
3. PageRank value convergence rate v.s. # of iterations
compareconvergence85.m: draw the PageRank value convergence curve for Stanford-Berkeley web graph with number of iterations as X-axis and L1 residual as Y-axis. c is set to 0.85.
compareconvergence90.m: draw the PageRank value convergence curve for Stanford-Berkeley web graph with number of iterations as X-axis and L1 residual as Y-axis. c is set to 0.90.
compareconvergence99.m: draw the PageRank value convergence curve for Stanford-Berkeley web graph with number of iterations as X-axis and L1 residual as Y-axis. c is set to 0.99.
compareconvergenceall.m: draw three PageRank value convergence curves for Stanford-Berkeley web graph with number of iterations as X-axis and L1 residual as Y-axis. c is set to 0.85, 0.90, and 0.99.
4. PageRank ranking distance
rankdistance.m: compute the ranking distance for the first 6834 pages (first 1 percent) of Stanford-Berkeley web graph after each iteration is done. Ranking distance is calculated by compare the PankRank value vector got after each iteration with the final vector.
rankdistances.m: compute the ranking distance for the first 2819 pages (first 1 percent) of Stanford web graph after each iteration is done.
rankdistancevsp.m: compute the ranking distance for the first 6834 pages (first 1 percent) of Stanford-Berkeley web graph with different percentage of the web group used.
rankdistancevsps.m: compute the ranking distance for the first 2819 pages (first 1 percent) of Stanford web graph with different percentage of the web group used.
drawsimilarity4.m: draw a PageRank similarity vs. iterations curve for Stanford-Berkeley web graph with number of iterations as X-axis and ranking distance as Y-axis. Tolerance is set to 10^-4.
drawsimilarity4s.m: draw a PageRank similarity vs. iterations curve for Stanford web graph with number of iterations as X-axis and ranking distance as Y-axis. Tolerance is set to 10^-4.
drawsimilarity8.m: draw a PageRank similarity vs. iterations curve for Stanford-Berkeley web graph with number of iterations as X-axis and ranking distance as Y-axis. Tolerance is set to 10^-8.
drawsimilarity8s.m: draw a PageRank similarity vs. iterations curve for Stanford web graph with number of iterations as X-axis and ranking distance as Y-axis. Tolerance is set to 10^-8.
drawsimilarityall.m: draw PageRank similarity vs. iterations curves for Stanford and Stanford-Berkeley web graph with number of iterations as X-axis and ranking distance as Y-axis. Tolerance is set to 10^-8.
drawsimilarityvsp.m: draw a PageRank similarity vs. Size of page set for Stanford-Berkeley web graph with percentage of pages used as X-axis and ranking distance as Y-axis. Tolerance is set to 10^-8.
5. Power law on inbound/outbound links
inbound.m: draw a curve with number of inbound links as X-axis and number of pages as Y-axis for Stanford-Berkeley web.
outbound.m: draw a curve with number of outbound links as X-axis and number of pages as Y-axis for Stanford-Berkeley web.
inbounds.m: draw a curve with number of inbound links as X-axis and number of pages as Y-axis for Stanford web.
outbounds.m: draw a curve with number of outbound links as X-axis and number of pages as Y-axis for Stanford web.
6. Power law on PageRank value
prdistribution.m: draw the PageRank value distribution of Stanford-Berkeley web graph.
prdistributions.m: draw the PageRank value distribution of Stanford web graph.
prdistributionc.m: draw the PageRank value distribution of a web graph generated using copy model.