sequences ii

16
Sequences II Prof. Noah Snavely CS1114 http://cs1114.cs.cornell.edu

Upload: byrd

Post on 01-Feb-2016

30 views

Category:

Documents


0 download

DESCRIPTION

Sequences II. Prof. Noah Snavely CS1114 http://cs1114.cs.cornell.edu. Administrivia. Assignments: A5P2 due on Friday Quiz Tuesday, 4/24 Final project proposals due on CMS by this Thursday. Google’s PageRank. H. Start at a random page, take a random walk. Where do we end up?. A. E. I. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Sequences II

Sequences II

Prof. Noah SnavelyCS1114http://cs1114.cs.cornell.edu

Page 2: Sequences II

Administrivia

Assignments:– A5P2 due on Friday

Quiz Tuesday, 4/24

Final project proposals due on CMS by this Thursday

2

Page 3: Sequences II

Google’s PageRank

3

AA

BB

CC

DD EE

FF

HH

II

JJ

GG

Start at a random page, take a random walk. Where do we end up?

Page 4: Sequences II

Google’s PageRank

4

AA

BB

CC

DD EE

FF

HH

II

JJ

GG

Add 15% probability of moving to a random page. Now where do we end up?

Page 5: Sequences II

Google’s PageRank

5

AA

BB

CC

DD EE

FF

HH

II

JJ

GG

PageRank(P) = Probability that a long random walk ends at node P

Page 6: Sequences II

(The ranks are an eigenvector of the transition matrix)

6

Example

Page 7: Sequences II

Modeling Texture

What is texture?– An image obeying some statistical properties– Similar structures repeated over and over again– Often has some degree of randomness

Page 8: Sequences II

Markov Random Field• A Markov random field (MRF)

• generalization of Markov chains to two or more dimensions.

• First-order MRF:• probability that pixel X takes a certain value given the

values of neighbors A, B, C, and D: D

C

X

A

B

X

X

• Higher order MRF’s have larger neighborhoods

Page 9: Sequences II

Texture Synthesis [Efros & Leung, ICCV 99]

Can apply 2D version of text synthesis

Page 10: Sequences II

More Synthesis Results

•Increasing window size

Page 11: Sequences II

More Results•aluminum wire•reptile skin

Page 12: Sequences II

Image-Based Text Synthesis

Page 13: Sequences II

Author recognition

Simple problem: Given two Markov chains, say Austen (A)

and Dickens (D), and a string s (with n words), how do we decide whether A or D wrote s?

Idea: For both A and D, compute the probability that a random walk of length n generates s

13

Page 14: Sequences II

Probability of a sequence

What is the probability of a given n-length sequence s?

s = s1 s2 s3 … sn

Probability of generating s = the product of transition probabilities:

14

Probability that a sequence

starts with s1

Transition probabilities

Page 15: Sequences II

Likelihood

Compute this probability for A and D

15

Jane Austen wrote s

Charles Dickens wrote s

???

“likelihood” of A

“likelihood” of D

Page 16: Sequences II

Problems with likelihood

1. Most strings of text (of significant length) have probability zero– Why?

2. Even if it’s not zero, it’s probably extremely small– What’s 0.01 * 0.01 * 0.01 * … (x200) … * 0.01?– According to Matlab, zero

How can we fix these problems?

16