Processing math: 100%
+ - 0:00:00
Notes for current slide
Notes for next slide

We'll consider the case of recognizing handwritten digits here

Exercise 9.19: Pattern recognition as a noisy channel

2020-04-03 - Saurabh B

1 / 17

Pattern recognition as a noisy channel

  • Many pattern recognition problems can be understood in terms of communication channels.
2 / 17

We'll consider the case of recognizing handwritten digits here

Pattern recognition as a noisy channel

  • Many pattern recognition problems can be understood in terms of communication channels.

  • Let's say we'd like communicate message from the set Ax

Ax={0,1,2,3,4,5,6,7,8,9}

2 / 17

We'll consider the case of recognizing handwritten digits here

this message will be input to our channel Q

Pattern recognition as a noisy channel

  • Many pattern recognition problems can be understood in terms of communication channels.

  • Let's say we'd like communicate message from the set Ax

Ax={0,1,2,3,4,5,6,7,8,9}

  • Output of channel is a pattern of ink on paper
2 / 17

We'll consider the case of recognizing handwritten digits here

this message will be input to our channel Q

Pattern recognition as a noisy channel

  • Many pattern recognition problems can be understood in terms of communication channels.

  • Let's say we'd like communicate message from the set Ax

Ax={0,1,2,3,4,5,6,7,8,9}

  • Output of channel is a pattern of ink on paper

  • The ink pattern is represented using 256 binary pixels, so output Ay alphabet:

Ay={0,1}256

2 / 17

We'll consider the case of recognizing handwritten digits here

this message will be input to our channel Q

Example of element from Ay

3 / 17

Example of element from Ay

4 / 17

Example of element from Ay

5 / 17

Example of element from Ay

6 / 17

Question:

  • Estimate how many patterns in Ay are recognizable as the character "2"

  • OR Demonstrate the existence of as many patterns as possible that are recognizable as 2s

7 / 17

Intuition

  • Remember bent coin lottery?
8 / 17

Intuition

  • Remember bent coin lottery?

  • Lottery ticket number is generated by tossing a bent coin (with P1=0.1) 1000 times

8 / 17

Intuition

  • Remember bent coin lottery?

  • Lottery ticket number is generated by tossing a bent coin (with P1=0.1) 1000 times

  • If you are allowed to buy only one ticket, which ticket would you buy?

8 / 17

Intuition

  • Remember bent coin lottery?

  • Lottery ticket number is generated by tossing a bent coin (with P1=0.1) 1000 times

  • If you are allowed to buy only one ticket, which ticket would you buy?

  • The ticket with all 0's

8 / 17

The ticket with all 0's, considering chances of getting 0 with each toss is much higher

Intuition

  • Remember bent coin lottery?

  • Lottery ticket number is generated by tossing a bent coin (with P1=0.1) 1000 times

  • If you are allowed to buy only one ticket, which ticket would you buy?

  • The ticket with all 0's

  • Next most probable ticket?, ticket with one "1"

8 / 17

The ticket with all 0's, considering chances of getting 0 with each toss is much higher

following this method, we can find out what tickets can give us best chance of winning upto certain probability

Solution

  • Intuition from bent coin lottery can be applied to our problem
9 / 17

Solution

  • Intuition from bent coin lottery can be applied to our problem

  • We have total of 2256 possible patterns in Ay

9 / 17

Solution

  • Intuition from bent coin lottery can be applied to our problem

  • We have total of 2256 possible patterns in Ay

  • To estimate number of pattern recognizable as "2", we focus on biggest contributing terms

9 / 17

Solution

  • Intuition from bent coin lottery can be applied to our problem

  • We have total of 2256 possible patterns in Ay

  • To estimate number of pattern recognizable as "2", we focus on biggest contributing terms

  • Here it will recognizable "2" made with least number of available pixels: 7×6

9 / 17

Smallest (7×6 ) patch of non-confusable "2" with white border

10 / 17

Complete 16×16 space

11 / 17

Number of places where we can place the "2" patch in 16×16 space

12 / 17

Number of places where we can place the "2" patch in 16×16 space

  • Along rows upto 12th element as last column is empty
12 / 17

Number of places where we can place the "2" patch in 16×16 space

  • Along rows upto 12th element as last column is empty

  • Along columns upto 11th element as last row is empty

12 / 17

Number of places where we can place the "2" patch in 16×16 space

  • Along rows upto 12th element as last column is empty

  • Along columns upto 11th element as last row is empty

  • That gives is us total of 12×11 possible option for placement

12 / 17

Leftover pixels and white/black border

13 / 17

Leftover pixels and white/black border

  • As patch size is 7×6=42 we have 25642=214 pixels leftover
13 / 17

Leftover pixels and white/black border

  • As patch size is 7×6=42 we have 25642=214 pixels leftover

  • These can be set arbitrarily, i.e total of 2214 possible values

13 / 17

Leftover pixels and white/black border

  • As patch size is 7×6=42 we have 25642=214 pixels leftover

  • These can be set arbitrarily, i.e total of 2214 possible values

  • We assumed "2" with white border, calculation remains the same for "2" with black border (i.e just to ×2)

13 / 17

Calculation

  • Estimate for total number of recognizable "2" patterns
14 / 17

Calculation

  • Estimate for total number of recognizable "2" patterns

  • Total number of places "2" patch can be places × Number of choices for leftover pixes × 2 (for black border)

14 / 17

Calculation

  • Estimate for total number of recognizable "2" patterns

  • Total number of places "2" patch can be places × Number of choices for leftover pixes × 2 (for black border)

12×11×2214×22222

14 / 17

Can there be other recognizable patterns is small patch of "2"?

15 / 17

Can there be other recognizable patterns is small patch of "2"?

  • Consider fraction 22222256=234
15 / 17

small fraction which is number of "2" patterns out of all possible patterns

Can there be other recognizable patterns is small patch of "2"?

  • Consider fraction 22222256=234
  • If we consider probability of other remaining 9 recognizable patterns in a small patch of "2"
15 / 17

small fraction which is number of "2" patterns out of all possible patterns

Can there be other recognizable patterns is small patch of "2"?

  • Consider fraction 22222256=234
  • If we consider probability of other remaining 9 recognizable patterns in a small patch of "2"

  • Of all possible "2" patches only 9×234 fraction could have other recognizable pattern

15 / 17

small fraction which is number of "2" patterns out of all possible patterns

Can there be other recognizable patterns is small patch of "2"?

  • Consider fraction 22222256=234
  • If we consider probability of other remaining 9 recognizable patterns in a small patch of "2"

  • Of all possible "2" patches only 9×234 fraction could have other recognizable pattern

  • This proves very very small fraction of remaining 214 pixels can have any other recognizable pattern

15 / 17

small fraction which is number of "2" patterns out of all possible patterns

Thank You!

Thank You!

Thank You!

16 / 17
17 / 17

Pattern recognition as a noisy channel

  • Many pattern recognition problems can be understood in terms of communication channels.
2 / 17

We'll consider the case of recognizing handwritten digits here

Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow