Stochastic Processes Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)

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.
Authorship recognition Prof. Noah Snavely CS1114
1 The PageRank Citation Ranking: Bring Order to the web Lawrence Page, Sergey Brin, Rajeev Motwani and Terry Winograd Presented by Fei Li.
Link Analysis: PageRank
IERG5300 Tutorial 1 Discrete-time Markov Chain
Operations Research: Applications and Algorithms
1 Markov Chains (covered in Sections 1.1, 1.6, 6.3, and 9.4)
Ch-9: Markov Models Prepared by Qaiser Abbas ( )
Experiments with MATLAB Experiments with MATLAB Google PageRank Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University, Taiwan
Planning under Uncertainty
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 3 March 23, 2005
Introduction to PageRank Algorithm and Programming Assignment 1 CSC4170 Web Intelligence and Social Computing Tutorial 4 Tutor: Tom Chao Zhou
CSE 522 – Algorithmic and Economic Aspects of the Internet Instructors: Nicole Immorlica Mohammad Mahdian.
1 Markov Chains Tom Finke. 2 Overview Outline of presentation The Markov chain model –Description and solution of simplest chain –Study of steady state.
Markov chains Prof. Noah Snavely CS1114
Announcements Project 4 questions? Guest lectures Thursday: Richard Ladner “tactile graphics” Next Tuesday: Jenny Yuen and Jeff Bigham.
Markov chains – Part 2 Prof. Noah Snavely CS1114
Texture Turk, 91.
Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 21: Link Analysis.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 3 April 2, 2006
15-853Page :Algorithms in the Real World Indexing and Searching III (well actually II) – Link Analysis – Near duplicate removal.
Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.
Link Analysis, PageRank and Search Engines on the Web
Presented By: Wang Hao March 8 th, 2011 The PageRank Citation Ranking: Bringing Order to the Web Lawrence Page, Sergey Brin, Rajeev Motwani, Terry Winograd.
1 Markov Chains Algorithms in Computational Biology Spring 2006 Slides were edited by Itai Sharon from Dan Geiger and Ydo Wexler.
Probabilistic Model of Sequences Bob Durrant School of Computer Science University of Birmingham (Slides: Dr Ata Kabán)
More Algorithms for Trees and Graphs Eric Roberts CS 106B March 11, 2013.
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.
Presented By: - Chandrika B N
6. Markov Chain. State Space The state space is the set of values a random variable X can take. E.g.: integer 1 to 6 in a dice experiment, or the locations.
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.
1 Applications of Relative Importance  Why is relative importance interesting? Web Social Networks Citation Graphs Biological Data  Graphs become too.
X-Informatics Web Search; Text Mining B 2013 Geoffrey Fox Associate Dean for.
Roshnika Fernando P AGE R ANK. W HY P AGE R ANK ?  The internet is a global system of networks linking to smaller networks.  This system keeps growing,
Random Walks and Semi-Supervised Learning Longin Jan Latecki Based on : Xiaojin Zhu. Semi-Supervised Learning with Graphs. PhD thesis. CMU-LTI ,
1 Random Walks on Graphs: An Overview Purnamrita Sarkar, CMU Shortened and modified by Longin Jan Latecki.
1 University of Qom Information Retrieval Course Web Search (Link Analysis) Based on:
CS315 – Link Analysis Three generations of Search Engines Anchor text Link analysis for ranking Pagerank HITS.
The PageRank Citation Ranking: Bringing Order to the Web Lawrence Page, Sergey Brin, Rajeev Motwani, Terry Winograd Presented by Anca Leuca, Antonis Makropoulos.
Adaptive On-Line Page Importance Computation Serge, Mihai, Gregory Presented By Liang Tian 7/13/2010 1Adaptive On-Line Page Importance Computation.
Keyword Search in Databases using PageRank By Michael Sirivianos April 11, 2003.
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.
Lecture #10 PageRank CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Ranking Link-based Ranking (2° generation) Reading 21.
1 1 COMP5331: Knowledge Discovery and Data Mining Acknowledgement: Slides modified based on the slides provided by Lawrence Page, Sergey Brin, Rajeev Motwani.
Information Retrieval and Web Search Link analysis Instructor: Rada Mihalcea (Note: This slide set was adapted from an IR course taught by Prof. Chris.
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.
Random Sampling Algorithms with Applications Kyomin Jung KAIST Aug ERC Workshop.
CS 540 Database Management Systems Web Data Management some slides are due to Kevin Chang 1.
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™
Texture Models Paul Heckbert, Nov , Image-Based Modeling and Rendering.
1 CS 430 / INFO 430: Information Retrieval Lecture 20 Web Search 2.
Announcements Project 4 out today help session at the end of class.
Search Engines and Link Analysis on the Web
Link-Based Ranking Seminar Social Media Mining University UC3M
PageRank and Markov Chains
DTMC Applications Ranking Web Pages & Slotted ALOHA
Announcements Final Project 3 artifacts Evals
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Piyush Kumar (Lecture 2: PageRank)
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Announcements Guest lecture next Tuesday
The chain of Andrej Markov and its applications NETWORKS goes to school - April 23, 2018 Jan-Pieter Dorsman.
Junghoo “John” Cho UCLA
Sequences II Prof. Noah Snavely CS1114
Presentation transcript:

Stochastic Processes Prof. Graeme Bailey (notes modified from Noah Snavely, Spring 2009)

New topic: modeling sequences  Lots of interesting things in the world can be thought of as sequences  Ordering of heads/tails in multiple coin flips  Ordering of moves in rock/paper/scissors  Text  Music  Closing stock prices  Web pages you visit on Wikipedia 2

How are sequences generated?  For some sequences, each element is generated independently –Coin flips  For others, the next element is generated deterministically –1, 2, 3, 4, 5, … ?  For others, the next element depends on previous elements, but exhibits some randomness –The sequence of web pages you visit on Wikipedia –We’ll focus on these (many interesting sequences can be modeled this way) 3

Markov chains 4  A sequence of random variables – is the state of the model at time t –Markov assumption: each state is dependent only on the previous one dependency given by a conditional probability: –This is actually a first-order Markov chain –An N’th-order Markov chain: (Slide credit: Steve Seitz) Andrei Markov

Markov chains  Example: Springtime in Ithaca Three possible conditions: nice, rainy, snowy If it’s nice today, then tomorrow it will be: rainy 75% of the time snowy 25% of the time If it’s rainy today, then tomorrow it will be: rainy 25% of the time nice 25% of the time snowy 50% of the time If it’s snowy today, then tomorrow it will be: rainy 50% of the time nice 25% of the time snowy 25% of the time 5

Markov chains  Example: Springtime in Ithaca  We can represent this as a kind of graph  (N = Nice, S = Snowy, R = Rainy) 6 N N R R S S N R S NRS Transition probabilities Note that there is no real convention for this matrix. Some authors write it this way, others prefer the transpose (ie top is ‘before’ and side is ‘after’, so then the columns sum to 1 instead of the rows).

Markov chains  Example: Springtime in Ithaca  We can represent this as a kind of graph  (N = Nice, S = Snowy, R = Rainy) 7 If it’s nice today, what’s the probability that it will be nice tomorrow? NRS N R S Transition probabilities If it’s nice today, what’s the probability that it will be nice the day after tomorrow?

Markov chains  The transition matrix at time t+1 is  The transition matrix at time t+n-1 is 8 NRS N R S =

Markov chains  What’s the weather in 20 days?  Almost completely independent of the weather today  The row [ ] is called the stationary distribution of the Markov chain  How might we acquire the probabilities for the transition matrix?  One approach … ‘learn’ it from lots of data (eg 20 years of weather data). 9

Markov Chain Example: Text “a dog is a man’s best friend. it’s a dog eat dog world out there.” 2/31/ a dog is man’s best friend it’s eat world out there dog isman’sbestfriendit’seat world outthere a.. (Slide credit: Steve Seitz)

Text synthesis  Create plausible looking poetry, love letters, term papers, etc.  Most basic algorithm: 1.Build transition matrix find all blocks of N consecutive words/letters in training documents compute probability of occurrence 2.Given words compute by sampling from  We can do the same sorts of things for music (notes, rhythm, harmonic structure, etc), paintings (colour, texture, arcs, etc), dance (construct a ‘grammar’ for choreography), mimicking human speech patterns, etc..

[Scientific American, June 1989, Dewdney] “I Spent an Interesting Evening Recently with a Grain of Salt” - Mark V. Shaney (computer-generated contributor to UseNet News group called net.singles)  You can try it online here: Output of 2nd order word-level Markov Chain after training on 90,000 word philosophical essay: “Perhaps only the allegory of simulation is unendurable--more cruel than Artaud's Theatre of Cruelty, which was the first to practice deterrence, abstraction, disconnection, deterritorialisation, etc.; and if it were our own past. We are witnessing the end of the negative form. But nothing separates one pole from the very swing of voting ''rights'' to electoral...”

Text synthesis  Jane Austen’s Pride and Prejudice: –121,549 words –8,828 unique words (most common: ‘the’) –7,800,000 possible pairs of words –58,786 pairs (0.075%) actually appeared –most common pair? –Given a model learned from this text, we can generate more “Jane Austen”-like novels estimate the likelihood that a snippet of text was written by Jane Austen – this is actually a much harder and more subtle problem  David Cope has done this for Bach chorales. 13

Music synthesis  Chord progressions learned from large database of guitar tablature, but we can build far more subtle and convincing Markov models 14 C C G G F F Am

Google’s PageRank 15 Page, Lawrence; Brin, Sergey; Motwani, Rajeev and Winograd, Terry (1999). The PageRank citation ranking: Bringing order to the WebThe PageRank citation ranking: Bringing order to the Web. See also: J. Kleinberg. Authoritative sources in a hyperlinked environment. Proc. 9th ACM-SIAM Symposium on Discrete Algorithms, 1998.Authoritative sources in a hyperlinked environment.

Stationary distributions  So why do we converge to these particular columns?  The vector [ ] is unchanged by multiplication by P T :  Where have we seen this before? 16 (note the reversion to the transpose in order to perform actual matrix multiplication!)

Stationary distributions  [ ] is an eigenvector of Q = P T –a vector x such that Q x = x –(in linear algebra, you’ll learn that the definition is a vector x such that Q x = λx, so in the above, the scaling factor λ was 1; it’s called the eigenvalue) –The vector x defines a line (all the scalar multiples of x), and this line is invariant under the action of Q –Such lines make for really nice coordinate axes for describing Q in the simplest possible way  If we look at a long sequence, this gives the proportion (spectrum) of days we expect to be nice/rainy/snowy – also a ‘steady state’ condition. 17

Google’s PageRank 18 A A B B C C D D E E F F H H I I J J G G Graph of the Internet (pages and links)

Google’s PageRank 19 A A B B C C D D E E F F H H I I J J G G Start at a random page, take a random walk. Where do we end up?

Google’s PageRank 20 A A B B C C D D E E F F H H I I J J G G Add 15% probability of moving to a random page. Now where do we end up?

Google’s PageRank 21 A A B B C C D D E E F F H H I I J J G G PageRank(P) = Probability that a long random walk ends at node P

(The ranks are an eigenvector of the transition matrix) 22

Back to text  We can use Markov chains to generate new text  Can they also help us recognize text? –In particular, the author? –Who wrote this paragraph? “Suppose that communal kitchen years to come perhaps. All trotting down with porringers and tommycans to be filled. Devour contents in the street. John Howard Parnell example the provost of Trinity every mother's son don't talk of your provosts and provost of Trinity women and children cabmen priests parsons fieldmarshals archbishops.” 23

Author recognition  We can use Markov chains to generate new text  Can they also help us recognize text? –How about this one? „Diess Alles schaute Zarathustra mit grosser Verwunderung; dann prüfte er jeden Einzelnen seiner Gäste mit leutseliger Neugierde, las ihre Seelen ab und wunderte sich von Neuem. Inzwischen hatten sich die Versammelten von ihren Sitzen erhoben und warteten mit Ehrfurcht, dass Zarathustra reden werde.“ 24

The Federalist Papers  85 articles addressed to New York State, arguing for ratification of the Constitution ( )  Written by “Publius” (?)  Really written by three different authors: –John Jay, James Madison, Andrew Hamilton  Who wrote which one? –73 have known authors, 12 are in dispute 25

Author recognition  Suppose we want to know who wrote a given paragraph/page/article of text  Idea: for each suspected author: –Download all of their works –Compute the transition matrix –Find out which author’s transition matrix is the best fit to the paragraph  What is the probability of a given n-length sequence s (aka random walk)? s = s 1 s 2 s 3 … s n –Probability of generating s = the product of transition probabilities: 26 Transition probabilities Probability that a sequence starts with s 1