• Tidak ada hasil yang ditemukan

Lecture ANN 4

N/A
N/A
Protected

Academic year: 2017

Membagikan "Lecture ANN 4"

Copied!
20
0
0

Teks penuh

(1)

4

(2)

4

Learning Rules

p1 t1

{ , }, {p2, }t2 , … , {pQ,tQ}

Supervised Learning

Network is provided with a set of examples of proper network behavior (inputs/targets)

Reinforcement Learning

Network is only provided with a grade, or score, which indicates network performance

Unsupervised Learning

(3)

4

Perceptron Architecture

p a 1 n

A

W

A

A

b

Rx1

SxR

Sx1

Sx1

Sx1

Input

R

AA

S

AA

AA

a = hardlim(Wp+b)

Hard Limit Layer W

w1 1, w1 2,w1, R

w2 1, w2 2,w2, R

wS, 1 wS,2wS R, =

w

i

wi 1,

wi 2,

wi, R

= W wT 1 wT 2 wT S =

(4)

4

Single-Neuron Perceptron

p1

a n

Inputs

b

p2 w

1,2

w1,1

1

AA

AA

Σ

AA

AA

a = hardlim(Wp+b)

Two-Input Neuron

w1 1, = 1 w1 2, = 1 b = 1

p1

p2

1wTp+b=0

a = 1

a = 0

1

1

(5)

4

Decision Boundary

1w 1w

wT

1 p + b = 0 w

T

1 p = –b

• All points on the decision boundary have the same inner product with the weight vector.

• Therefore they have the same projection onto the weight vector, and they must lie on a line orthogonal to the

weight vector

1wTp+b=0

(6)

4

Example - OR

p1 0

0

= , t1 = 0

 

 

 

p2 0

1

= , t2 = 1

 

 

 

p3 1

0

= , t3 = 1

 

 

 

p4 1

1

= , t4 = 1

 

 

(7)

4

OR Solution

1w

OR

w

1 0.5

0.5 =

wT

1 p + b 0.5 0.5 0 0.5

b

+ 0.25 + b 0

= = = ⇒ b = –0.25

Weight vector should be orthogonal to the decision boundary.

(8)

4

Multiple-Neuron Perceptron

Each neuron will have its own decision boundary.

wT

i p + bi = 0

A single neuron can classify input vectors

into two categories.

(9)

4

Learning Rule Test Problem

p1 t1

{ , }, {p2,t2} , ,… {pQ,tQ}

p1 1

2

= , t1 = 1

 

 

 

p2 –1

2

= , t2 = 0

 

 

 

p3 0

1 –

= , t3 = 0

      p1 a n Inputs

p2 w

1,2 w1,1

AA

AA

Σ

AA

AA

a = hardlim(Wp)

(10)

4

Starting Point

1w

1

3 2

w

1 1.0

0.8 – =

Present p1 to the network:

a hardlim(1wTp1) hardlim 1.0 0.8 1

2

 

 

 

= =

(11)

4

Tentative Learning Rule

1w

1 2

• Set

1

w

to

p

1 – Not stable

• Add

p

1

to

1

w

If t = 1 and a = 0, then 1wnew = 1wold + p

w

1

new

w

1

old

p1

+ 1.0

0.8 –

1 2

+ 2.0

1.2

= = =

(12)

4

Second Input Vector

1 2

If t = 0 and a = 1, then 1wne w = 1woldp

a hardlim(1wTp2) hardlim 2.0 1.2 –1

2

 

 

 

= =

a = hardlim(0.4) = 1 (Incorrect Classification)

Modification to Rule:

w

1

new

w

1

old

p2

– 2.0

1.2

1 –

2

– 3.0

0.8 –

(13)

4

Third Input Vector

1w

1

3 2

Patterns are now correctly classified.

a hardlim(1wTp3) hardlim 3.0 0.8 0

1 –       = =

a = hardlim 0.8( ) = 1 (Incorrect Classification)

w 1 new w 1 old p3 – 3.0 0.8 – 0 1 – – 3.0 0.2 = = =

(14)

4

Unified Learning Rule

If t = 1 and a = 0, then 1wnew = 1wold + p

If t = 0 and a = 1, then 1wnew = 1woldp

If t = a, then 1wnew = 1wold

e = ta

If e = 1, then 1wnew = 1wold + p

If e = –1, then 1wnew = 1woldp

If e = 0, then 1wnew = 1wold

(15)

4

Multiple-Neuron Perceptrons

w

i

ne w

w

i

old

eip

+ =

binew = biold + ei

Wnew = Wold + epT

bnew = bold + e

To update the ith row of the weight matrix:

(16)

4

Apple/Banana Example

W = 0.5 1 0.5 b = 0.5

a hardlim(Wp1 + b) hardlim 0.5 1 0.5

1 – 1 1 – 0.5 +           = = Training Set Initial Weights First Iteration p1 1 – 1 1 – t1 , 1 = =           p2 1 1 1 – t2 , 0 = =          

(17)

4

Second Iteration

a hardlim (Wp2 + b) hardlim 0.5 0 1.5

1 1 1 –

1.5

( )

+

( )

= =

a = hardlim (2.5) = 1

e = t2a = 0 – 1 = –1

Wne w = Wold + epT = 0.5 0 1.5 + ( )–1 1 1 1 = 1.5 1 0.5

(18)

4

Check

a hardlim (Wp1 + b) hardlim 1.5 1 0.5

1 –

1 1 –

0.5 +

( )

= =

a = hardlim (1.5) = 1 = t1

a hardlim (Wp2 + b) hardlim 1.5 1 0.5

1 1 1 –

0.5 +

( )

= =

(19)

4

Perceptron Rule Capability

The perceptron rule will always

converge to weights which accomplish

the desired classification, assuming that

(20)

4

Perceptron Limitations

wT

1 p + b = 0

Linear Decision Boundary

Referensi

Garis besar

Dokumen terkait

• The two mechanisms by which oxygen in carried in the blood: dissolved and bound to hemoglobin.. • Oxygen-hemoglobin

A natural question is whether testing this unpredictability property is equivalent to testing the nonlinear restrictions embedded in the Hansen-Sargent formula which relates the

options for their children,27 but very few of these sources offer a robust and balanced view of how Christians can engage in public education.28 Literature does exist that calls the

Assuming that the information given in the statements is true, even if it appears to be at variance with commonly known facts, decide which of the given conclusions logically follows

that can be perceived by exposure to the media or seeking the desired information, which can be divided into the Historical Dimension: such as Muay Chaiya is a southern Thai identity

Hate Speech Hashtag Classification was be carried out using the Hybrid Artificial Neural Network ANN method to produce satisfactory results compared to previous methods such as KNN

Kinetic Molecular Theory of Gases …  The average kinetic energy of the gas particles is directly proportional to the Kelvin temperature of the gas the fact that gases fill up the

Assuming that you have already changed the axis, copying the following lines of text after the axis command will put all the labels on the plot: Example: title'step response of