Docsity

Linear Separation in Supervised Learning: Perceptrons and Support Vector Machines, Slides of Learning processes

Partial preview of the text

Download Linear Separation in Supervised Learning: Perceptrons and Support Vector Machines and more Slides Learning processes in PDF only on Docsity!

Supervised Learning (contd)

Linear Separation

Mausam (based on slides by UW-AI faculty)

Images as Vectors

Binary handwritten characters

Greyscale images

Treat an image as a high- dimensional vector (e.g., by reading pixel values left to right, top to bottom row)

  N

N p

p

p

p

2

2

1

I

Pixel value pi can be 0 or 1 (binary image) or 0 to 255 (greyscale)

Neurons communicate via spikes

Inputs

Output spike (electrical pulse)

Output spike roughly dependent on whether

sum of all inputs reaches a threshold

“Perceptrons” for Classification

Fancy name for a type of layered “feed-forward” networks (no loops)

Uses artificial neurons (“units”) with binary inputs and outputs

Multilayer

Single-layer

Perceptrons and Classification

Consider a single-layer perceptron

  • Weighted sum forms a linear hyperplane
  • Everything on one side of this hyperplane is in

class 1 (output = +1) and everything on other

side is class 2 (output = -1)

Any function that is linearly separable can be

computed by a perceptron

 j  i ^0

j

wjiu 

How do we learn the appropriate weights given only examples of (input,output)?

Idea: Change the weights to decrease the error in output

Perceptron Training Rule

Linear Inseparability

Perceptron with threshold units fails if classification task is not linearly separable

  • Example: XOR
  • No single line can separate the “yes” (+1) outputs from the “no” (-1) outputs!

Minsky and Papert’s book showing such negative results put a damper on neural networks research for over a decade!

u 1

u 2

X

How do we deal with linear

inseparability?

x y

out

x

y

2

1 1  1 ^1

2  1

1  1

2 ^1

Multilayer Perceptron: What does it do?

x y

out

x

y

1  x  y 

1  x  y 

2

1 1  1

y x 2

 1 ^1

Multilayer Perceptron: What does it do?

x y

out

x

y

1  1

2 ^1

- 2

^1 (^) >

Multilayer Perceptron: What does it do?

x y

out

x

y

2  x  y  0

1  x  y 

2

1 1  1 ^1

2  1

1  1

2 ^1

Perceptrons as Constraint Satisfaction Networks