cs lecture oct 26

cs lecture oct 26 - Representing the Web struct link { int...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
cs lecture oct 26 How does Google read your mind? (organic ranking) -structure and content of web pages (Including anchor text) -user behavior (implicit user feedback), frequency of clicks on first/2 nd or third link, then re-rank -“quality” of page; static rank; (eg. PageRank) Random surfer model: SEO -pretend you’re surfing randomly -At each step you either a. follow a link (probability x) or b. jump to a random page (probability 1- x) defn: the PageRank – R(a) of a page Q is the probability you’re on a page Q after surfing for a long time. Computing PageRank ~R(Q) R(Q) = (1-&)/N +
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
System of linear equations x=1/15 +4/5 y y=1/15 + 2/5 x + 4/5 z z= 1/15 + 2/5 x x=61/159 = 0.383648 y=0.396326 = 21/53 z=0.22613 35/159 Solve with fixed point iteration initial guess x=y=z=1/3=0.3333333333333333333333’ new x = 1/15 + 4/5 y new y = 1/15 + 2/5 x + 4/5 z old guesses new z = 1/5 + 2/5 x x y z 0 0.333 0.333 0.333 1 0.333 0.467 0.233 2 0.440 0.360 0.200 11 0.383 0.396 0.222 20 ITERATIONS => 5 digits of accuracy
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Representing the Web struct link { int src,dst; }; struck link l={{0,1},{0,2},{1,0},{2,1}}; void pagerank (struct link l, int links, double r, int pages,double delta, int iterations) { /* Assume pages, links, iterations > 0 Assume 0<delta<1 Assumes src, dst, etc. correct Assumes not sinks */ int i,j double s[pages]; - C99 int out[pages]; /* compute number of outlinks for each page */ for(j=0;j<pages;j++) out[j]=0; for (j=0;i<links;j++) out[l[j].src]++; /* initial guess */ for(j=0;j<pages;i++) r[j]=1.0/pages; for(i=0; i<iterations; i++){ /* new ranks computed in s */ for(j=0;j<pages;j++) s[j]=(1-delta)/pages; /* apply links */ for(j=0;j<links;j++) s[l[j].dst] +=delta*r[l[j].src]/out[l[j].src]; /* update r*/ for(j=0;j<pages;j++) r[j]=s[j]; int main(void) { int I; double r[3]; struck link l={{0,1},{0,2},{1,0},{2,1}}; pagerank(l,4,r,3,0.80,20); for(i=0;i<3;i++) printf(%g\n,r[i]); return 0; }...
View Full Document

This note was uploaded on 12/10/2011 for the course CS 137 taught by Professor Clarke during the Fall '10 term at Waterloo.

Page1 / 4

cs lecture oct 26 - Representing the Web struct link { int...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online