CompSci 100E 3.1 Random Walks “A drunk man wil l find his way home, but a drunk bird may get lost forever”  – Shizuo Kakutani Suppose you proceed randomly.

Slides:



Advertisements
Similar presentations
Markov Models.
Advertisements

Matrices, Digraphs, Markov Chains & Their Use by Google Leslie Hogben Iowa State University and American Institute of Mathematics Leslie Hogben Iowa State.
Google Pagerank: how Google orders your webpages Dan Teague NCSSM.
Information Networks Link Analysis Ranking Lecture 8.
Graphs, Node importance, Link Analysis Ranking, Random walks
CS345 Data Mining Link Analysis Algorithms Page Rank Anand Rajaraman, Jeffrey D. Ullman.
Link Analysis: PageRank
Google’s PageRank By Zack Kenz. Outline Intro to web searching Review of Linear Algebra Weather example Basics of PageRank Solving the Google Matrix Calculating.
Markov Chains 1.
More on Rankings. Query-independent LAR Have an a-priori ordering of the web pages Q: Set of pages that contain the keywords in the query q Present the.
Experiments with MATLAB Experiments with MATLAB Google PageRank Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University, Taiwan
DATA MINING LECTURE 12 Link Analysis Ranking Random walks.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 3 March 23, 2005
Link Analysis Ranking. How do search engines decide how to rank your query results? Guess why Google ranks the query results the way it does How would.
Introduction to PageRank Algorithm and Programming Assignment 1 CSC4170 Web Intelligence and Social Computing Tutorial 4 Tutor: Tom Chao Zhou
Pádraig Cunningham University College Dublin Matrix Tutorial Transition Matrices Graphs Random Walks.
How Google Relies on Discrete Mathematics Gerald Kruse Juniata College Huntingdon, PA
Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 21: Link Analysis.
Zdravko Markov and Daniel T. Larose, Data Mining the Web: Uncovering Patterns in Web Content, Structure, and Usage, Wiley, Slides for Chapter 1:
Page Rank.  Intuition: solve the recursive equation: “a page is important if important pages link to it.”  Maximailly: importance = the principal eigenvector.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 3 April 2, 2006
Link Analysis, PageRank and Search Engines on the Web
Markov Models. Markov Chain A sequence of states: X 1, X 2, X 3, … Usually over time The transition from X t-1 to X t depends only on X t-1 (Markov Property).
1 COMP4332 Web Data Thanks for Raymond Wong’s slides.
Motivation When searching for information on the WWW, user perform a query to a search engine. The engine return, as the query’s result, a list of Web.
Google’s PageRank: The Math Behind the Search Engine Author:Rebecca S. Wills, 2006 Instructor: Dr. Yuan Presenter: Wayne.
Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 21: Link Analysis.
Piyush Kumar (Lecture 2: PageRank) Welcome to COT5405.
Google’s Billion Dollar Eigenvector Gerald Kruse, PhD. John ‘54 and Irene ‘58 Dale Professor of MA, CS and I T Interim Assistant Provost Juniata.
The Technology Behind. The World Wide Web In July 2008, Google announced that they found 1 trillion unique webpages! Billions of new web pages appear.
Methods of Computing the PageRank Vector Tom Mangan.
CS315 – Link Analysis Three generations of Search Engines Anchor text Link analysis for ranking Pagerank HITS.
1.4 Arrays Introduction to Programming in Java: An Interdisciplinary Approach · Robert Sedgewick and Kevin Wayne · Copyright © 2008.
Mathematics at Google. Brief history Started in 1996 as the research project ‘Backrub’ by the then PhD student Larry Page Sergey Brin joined in Became.
The PageRank Citation Ranking: Bringing Order to the Web Lawrence Page, Sergey Brin, Rajeev Motwani, Terry Winograd Presented by Anca Leuca, Antonis Makropoulos.
Center for E-Business Technology Seoul National University Seoul, Korea BrowseRank: letting the web users vote for page importance Yuting Liu, Bin Gao,
Multidimensional Arrays. 2 Two Dimensional Arrays Two dimensional arrays. n Table of grades for each student on various exams. n Table of data for each.
PageRank. s1s1 p 12 p 21 s2s2 s3s3 p 31 s4s4 p 41 p 34 p 42 p 13 x 1 = p 21 p 34 p 41 + p 34 p 42 p 21 + p 21 p 31 p 41 + p 31 p 42 p 21 / Σ x 2 = p 31.
How works M. Ram Murty, FRSC Queen’s Research Chair Queen’s University or How linear algebra powers the search engine.
Link Analysis Rong Jin. Web Structure  Web is a graph Each web site correspond to a node A link from one site to another site forms a directed edge 
9 Algorithms: PageRank. Ranking After matching, have to rank:
1 1 COMP5331: Knowledge Discovery and Data Mining Acknowledgement: Slides modified based on the slides provided by Lawrence Page, Sergey Brin, Rajeev Motwani.
CompSci 100E 4.1 Google’s PageRank web site xxx web site yyyy web site a b c d e f g web site pdq pdq.. web site yyyy web site a b c d e f g web site xxx.
Link Analysis Algorithms Page Rank Slides from Stanford CS345, slightly modified.
Ljiljana Rajačić. Page Rank Web as a directed graph  Nodes: Web pages  Edges: Hyperlinks 2 / 25 Ljiljana Rajačić.
CS 112 Introduction to Programming Array Reference Semantics; 2D Arrays Yang (Richard) Yang Computer Science Department Yale University 208A Watson, Phone:
1 A Case Study: Percolation Percolation. Pour liquid on top of some porous material. Will liquid reach the bottom? Applications. [ chemistry, materials.
2.4 A Case Study: Percolation Introduction to Programming in Java: An Interdisciplinary Approach · Robert Sedgewick and Kevin Wayne · Copyright © 2008.
Random Sampling Algorithms with Applications Kyomin Jung KAIST Aug ERC Workshop.
Computation on Graphs. Graphs and Sparse Matrices Sparse matrix is a representation of.
A Sublinear Time Algorithm for PageRank Computations CHRISTIA N BORGS MICHAEL BRAUTBA R JENNIFER CHAYES SHANG- HUA TENG.
PageRank Google : its search listings always seemed deliver the “good stuff” up front. 1 2 Part of the magic behind it is its PageRank Algorithm PageRank™
Mathematics of the Web Prof. Sara Billey University of Washington.
Web Mining Link Analysis Algorithms Page Rank. Ranking web pages  Web pages are not equally “important” v  Inlinks.
15-499:Algorithms and Applications
Search Engines and Link Analysis on the Web
PageRank and Markov Chains
DTMC Applications Ranking Web Pages & Slotted ALOHA
Multidimensional Arrays
Iterative Aggregation Disaggregation
Lecture 22 SVD, Eigenvector, and Web Search
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Multidimensional Arrays
Piyush Kumar (Lecture 2: PageRank)
9 Algorithms: PageRank.
9 Algorithms: PageRank.
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
The chain of Andrej Markov and its applications NETWORKS goes to school - April 23, 2018 Jan-Pieter Dorsman.
Lecture 22 SVD, Eigenvector, and Web Search
Lecture 22 SVD, Eigenvector, and Web Search
Presentation transcript:

CompSci 100E 3.1 Random Walks “A drunk man wil l find his way home, but a drunk bird may get lost forever”  – Shizuo Kakutani Suppose you proceed randomly from the middle of a large city whose streets form a completegrid  Will you make it back home?  Will you escape? What if you mark the intersections you’ve visited?  Self avoiding random walk  Applications to chemistry: polymer formation

CompSci 100E D Arrays Want to arrange information in rows and columns Initialize double[][] a = new double[M][N]; Nested loops to access for (int i = 0; i < M; i+= 1) for (int j = 0; j < N; j+= 1) a[i][j] = 0; Represent as 1-D array?

CompSci 100E 3.3 PageRank Google's PageRank™ algorithm. [Sergey Brin and Larry Page, 1998]  Measure popularity of pages based on hyperlink structure of Web. Revolutionized access to world's information.

CompSci 100E Rule Model. Web surfer chooses next page:  90% of the time surfer clicks random hyperlink.  10% of the time surfer types a random page. Caveat. Crude, but useful, web surfing model.  No one chooses links with equal probability.  No real potential to surf directly to each page on the web.  The breakdown is just a guess.  It does not take the back button or bookmarks into account.  We can only afford to work with a small sample of the web.  …

CompSci 100E 3.5 Web Graph Input Format Input format.  N pages numbered 0 through N-1.  Represent each hyperlink with a pair of integers. Graph representation

CompSci 100E 3.6 Transition Matrix Transition matrix. p[i][j] = prob. that surfer moves from page i to j. surfer on page 1 goes to page 2 next 38% of the time

CompSci 100E 3.7 Web Graph to Transition Matrix % java Transition tiny.txt

CompSci 100E 3.8 Monte Carlo Simulation Monte Carlo simulation.  Surfer starts on page 0.  Repeatedly choose next page, according to transition matrix.  Calculate how often surfer visits each page. transition matrix page How? see next slide

CompSci 100E 3.9 Random Surfer Random move. Surfer is on page page. How to choose next page j ?  Row page of transition matrix gives probabilities.  Compute cumulative probabilities for row page.  Generate random number r between 0.0 and 1.0.  Choose page j corresponding to interval where r lies. page transition matrix

CompSci 100E 3.10 Random Surfer Random move. Surfer is on page page. How to choose next page j ?  Row page of transition matrix gives probabilities.  Compute cumulative probabilities for row page.  Generate random number r between 0.0 and 1.0.  Choose page j corresponding to interval where r lies. // make one random move double r = Math.random(); double sum = 0.0; for (int j = 0; j < N; j++) { // find interval containing r sum += p[page][j]; if (r < sum) { page = j; break; } }

CompSci 100E 3.11 Random Surfer: Monte Carlo Simulation public class RandomSurfer { public static void main(String[] args) { int T = Integer.parseInt(args[0]); // number of moves int N = in.nextInt(); // number of pages int page = 0; // current page double[][] p = new int[N][N]; // transition matrix // read in transition matrix... // simulate random surfer and count page frequencies int[] freq = new int[N]; for (int t = 0; t < T; t++) { // make one random move freq[page]++; } // print page ranks for (int i = 0; i < N; i++) { System.out.println(String.format("%8.5f", (double) freq[i] / T); } System.out.println(); } see previous slide page rank

CompSci 100E 3.12 Mathematical Context Convergence. For the random surfer model, the fraction of time the surfer spends on each page converges to a unique distribution, independent of the starting page. "page rank" "stationary distribution" of Markov chain "principal eigenvector" of transition matrix

CompSci 100E 3.13 The Power Method Q. If the surfer starts on page 0, what is the probability that surfer ends up on page i after one step? A. First row of transition matrix.

CompSci 100E 3.14 The Power Method Q. If the surfer starts on page 0, what is the probability that surfer ends up on page i after two steps? A. Matrix-vector multiplication.

CompSci 100E 3.15 The Power Method Power method. Repeat until page ranks converge.

CompSci 100E 3.16 Mathematical Context Convergence. For the random surfer model, the power method iterates converge to a unique distribution, independent of the starting page. "page rank" "stationary distribution" of Markov chain "principal eigenvector" of transition matrix

CompSci 100E 3.17

CompSci 100E 3.18 Random Surfer: Scientific Challenges Google's PageRank™ algorithm. [Sergey Brin and Larry Page, 1998]  Rank importance of pages based on hyperlink structure of web, using rule.  Revolutionized access to world's information. Scientific challenges. Cope with 4 billion-by-4 billion matrix!  Need data structures to enable computation.  Need linear algebra to fully understand computation.