Chapter
This presentation is the property of its rightful owner.
Sponsored Links
1 / 58

The Threshold Logic Unit (TLU), McCulloch&Pitts, 1943 is the simplest model PowerPoint PPT Presentation


  • 84 Views
  • Uploaded on
  • Presentation posted in: General

Chapter 3 Simple Supervised learning. The Threshold Logic Unit (TLU), McCulloch&Pitts, 1943 is the simplest model of an artificial neuron. TLU is the feedforward structure, which only one of several available. The feedforward is used to place an

Download Presentation

The Threshold Logic Unit (TLU), McCulloch&Pitts, 1943 is the simplest model

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Chapter 3 Simple Supervised learning

The Threshold Logic Unit (TLU),

McCulloch&Pitts, 1943 is the simplest model

of an artificial neuron.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

TLU is the feedforward structure,

which only one of several available.

The feedforward is used to place an

input pattern into one of several

classes according to the resulting

pattern of outputs.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

The requirements of McCulloch-Pitts

  • The activation is binary. (1 is fire or 0 is not fire)

  • The neurons are connected by directed, weighted paths.

  • 3. A connection path is excitatory if the weight on the path is positive; otherwise it is inhibitory. (All excitatory connections into a particular neuron have the same weights)


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

The requirements of McCulloch-Pitts

  • Each neuron has a fixed threshold such that if the net input is greater than threshold, the neuron fires.

  • The threshold is set so that inhibition is absolute. That is, any nonzero inhibitory input will prevent the neuron from firing.

  • 6. It takes one time step for a signal to pass over one connection link.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2

X1

2

Y

X2

-1

X3

Simple McCulloch-Pitts Architecture


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Algorithm

The weights for neuron are set,

together with the threshold for the

neuron’s activation function, thus the

neuron will perform a simple logic

function.

We used the simple neurons as

building blocks, that can model any

function that can be represented as a

logic function. Rather than a training

algorithm, it is used to determine the

values of weights and threshold.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

W1

X1

Y

X2

W2

Simple networks for logic functions

The binary form of the functions for AND, OR and AND NOT are defined for reference the neuron’s activation function. This defined the threshold on Y unit to be 2.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

AND function

gives the following four training input, target output pairs :

X1 X2  Y

0 0 0

0 1 0

1 0 0

1 1 1

จะสามารถกำหนด w1 และ w2 มีค่าเท่ากับ ?


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

OR function

gives the following four training input, target output pairs :

X1 X2  Y

0 0 0

0 1 1

1 0 1

1 1 1

จะสามารถกำหนด w1 และ w2 มีค่าเท่ากับ ?


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

AND NOT function

gives the following four training input, target output pairs :

X1 X2  Y

0 0 0

0 1 0

1 0 1

1 1 0

จะสามารถกำหนด w1 มีค่าเท่ากับ ? และ

w2 มีค่าเท่ากับ ?


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

XOR function

x1 XOR x2  (x1 AND NOT x2) OR (x2 AND NOT x1)

How to model the network for XOR function?


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.1 Pattern Classification

For NN approach, we assume that there are

a set of training patterns for which the correct

classification is known.In the simplest case,

we find the output unit represents

membership in the class with a response of 1;

a response of -1 (or 0) indicates the pattern

is not a member of the class.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Simple Pattern Classification

The activation function

y_in = w1x1+ w2x2+….+ wnxn

The output (bipolar value)

-1 if y_in < threshold

f(y_in) =

1 if y_in >= threshold


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

AND TLU : threshold = 3

w1, w2 = ?


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.2 The linear separation of classes

Critical condition of classification :

the activation equals the threshold

For 2-D case :


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

กรณี binary input ที่กำหนด w1, w2 = 1

threshold = 1.5

: a = -1 , b =1.5


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.3 Biases and Thresholds

A bias acts as a weight on a connection from a unit whose activation is always 1. Increasing the bias increases the net input to the unit.

net = b + n wnxn

The output

-1 if net < 0

f(net) =

1 if net >= 0


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Single Layer with a Binary Step Function

Consider a network with 2 inputs and 1 output

node (2 classes).

The net output of the network is a linear function

of the weights and the inputs.

net = W X = x1 w1 + x2 w2y = f(net)       

x1 w1 + x2 w2 = 0 defines a straight line through the input space.

 x2 = - w1/w2 x1 <- this is line through the origin with slope -w1/w2


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Bias (threshold)

What if the line dividing the 2 classes does not

go through the origin?


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.4 The inner products

v = (1,1) และ w =(0,2)


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

ความสัมพันธ์ของมุมกับค่าผลคูณ


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Vector Projections


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.5 Inner products and TLUs

ดังนั้น


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

แยกได้เป็น 2 กรณี (2 classes)

กรณี 1


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

กรณี 2


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

  • Other interesting geometric points to note:

  • The weight vector (w1, w2) is normal to

  • the decision boundary.Proof: Suppose z1 and z2 are points on the

  • decision boundary.  


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

  • 2.6 Training TLUs

  • Training Methods :three kinds of methods

  • for training single-layer networks that do

  • pattern classification.

  • Hebb net -earliest and simplest learning rule

  • Perceptron -guaranteed to find the right

  • weights if they exist

  • The Adaline (uses Delta Rule) -can easily

  • be generalized to multi-layer

  • nets (nonlinear problems)


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Hebb Algorithm

Step 0. Initialize all weights :

wi = 0 (i=1 to n)

Step 1. For each input training vector and target output pair, s : t, do steps 2-4

Step 2. Set activations for input units :

xi = si ( i=1 to n)

Step 3. Set activation for output unit:

y = t

Step 4. Adjust the weights for

wi(new) = wi(old) + xiy

Adjust the bias

b(new) = b(old) + y


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.7 Perceptron

Rosenblatt introduced it in 1962.

Perceptron consists of a TLU whose

inputs come from a set of preprocessing

association units.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Perceptron Training

ใน training unit จะมีการปรับ weight

vector และ threshold เพื่อได้ค่าสำหรับ

การแบ่งกลุ่มที่เหมาะสม

การปรับค่า weight

กรณี 1


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

กรณี 2

โดย


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Perceptron ใช้การเรียนรู้อย่างง่าย

ที่เรียกว่า simple training rule

จากรูป p1 คือ training input


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

p2 คือ training input


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Perceptron Algorithm

Step 0. Initialize all weights :

wi= 0 (i=1 to n)

Set learning rate  ( 0 < <= 1)

Step 1. While stopping condition is false, do steps 2-6

Step 2. For each training pair s:t, do steps 3-5.

Step 3. Set activation of input units:

xi = si ( i=1 to n)

Step 4. Compute the response of output unit:

y_in = b + xiwi

1 if y_in > 

y = 0 if - <= y_in <=

-1 if y_in < -


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Perceptron Algorithm

Step 5. Update the weights and bias if an error

occurred for this pattern

if y  t

wi(new) = wi(old) + xit

b(new) = b(old) + t

else

wi(new) = wi(old)

b(new) = b(old)

Step 6. Test stopping condition:

if no weights changed in Step2, stop;

else, continue.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

การบ้าน

จงเขียนโปรแกรมเพื่อทำการเรียนรู้

ฟังก์ชัน OR ที่มีค่า weight 0.1,

0.2 และ threshold=0.5 โดยมี

learning rate = 0.3


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.8 Perceptronas classifiers

การใช้ perceptron training algorithm

อาจใช้ในการแบ่งข้อมูล (linearly separable

classes)


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

ถ้ามี 4 คลาสและจะทำการแบ่ง 2 ระนาบ

จะเขียน pattern space ได้ดังรูป


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

เริ่มจาก train two units เพื่อทำการแบ่ง

เป็น 2 กลุ่มก่อน จะได้เป็น (A B) (C D)

และ (A D) (B C) ดังนี้

output


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

จากความสัมพันธ์ของ 2 units เป็น 2 กลุ่ม

ถ้าแบ่งเป็น 4 กลุ่ม จะได้ดังนี้


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

โครงสร้างของ network ในการแบ่งข้อมูล


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

w1

x1

.

.

.

Y

wn

xn

b

1

2.9 ADALINE

Adaptive Linear Neuron using delta rule

for training. An ADALINE is a special case in

which there is only one output unit.

Architecture of ADALINE is a single neuron

that receives input from several units.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

สมการปรับค่า weight

นั่นคือ

เรียกว่า a training rule หรือ learning rule

และ พารามิเตอร์ เรียกว่า learning rate


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

การเรียนรู้แบบ supervise ใน neural นั้น

เป็นการเรียนรู้ข้อมูลจาก training set ซึ่ง

ข้อมูลนั้นจะมีรูปแบบ output ที่กำหนดไว้แล้ว

ระบบ network จะนำข้อมูลเข้ามาทำงาน

ภายใต้ learning rule เพื่อปรับค่า weight

จนกระทั่งได้ค่า weight ที่เหมาะสมสำหรับ

นำไปใช้งานต่อไปซึ่งค่า weight ที่เหมาะสม

จะพิจารณาเมื่อ network นั้น convergence

ถึงจุดที่ไม่มีการเปลี่ยนแปลงข้อมูล


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Training Algorithm

Step 0. Initialize weights. (Small random values)

set learning rate .

Step 1. While stopping condition is false, do Step 2-6.

Step 2. For each bipolar training pair s:t,

do Step 3-5.

Step 3. Set activations of input units,

i=1,…,n

xi = si

Step 4. Compute net input to output

y_in = b + xiwi

Step 5. Update bias and weights

b(new) = b(old)+(t-y_in)

wi(new) = wi(old )+(t-y_in)xi

Step 6. Test for stopping condition.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.10 Delta rule : minimizing an error

2.10.1 Hebb’s learning law

From linear associator network, the

output vector y’ is derived from the

input vector x by means of this formula.

where W = (wij) is the

m x n weight matrix.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.10.2 gradient descent function


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

ดังนั้น

จากค่า slope ที่ยกกำลังสอง ทำให้ค่าเป็นบวกเสมอ

และเมื่อคูณด้วยพารามิเตอร์ที่มีค่าเป็นลบ ส่งผลให้

สมการข้างต้นมีค่า <0 ดังนั้นจึงมีลักษณะเป็น

“travelled down”


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Delta rule is also known as

- Widrow-Hoff rule

- Least Mean Squares (LMS) rule

To train the network, we adjust the weights

in the network so as to decrease the cost

(this is where we require differentiability).

This is called gradient descent.

Delta Rule: Training by Gradient Descent Revisited


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

2.10.3 Gradient descent on error

The early ADALINE(ADAptive LInear

NEuron) model of Widrow and Hoff is

discussed as a simple type of processing

element. The Widrow learning law applied

minimizing error as the delta rule.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Delta rule จะทำการคำนวณ error ที่เกิดจากtraining set ของแต่ละครั้ง แล้วนำค่านั้นไป

พิจารณาเป็นฟังก์ชันของ weight ในรูปของ

gradient descent on the error

จากสมการ ค่า error Epคือฟังก์ชันของ weights

สำหรับ input pattern 1 input ดังนั้นค่าของ

error ทั้งหมด (Total error, E) แสดงดังนี้


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

The learning algorithm terminates once we are

at, or sufficiently near to, the minimum of the

error function, where dE/dw = 0. We say

then that the algorithm has converged.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

An important consideration is the learning

rate µ, which determines by how much

we change the weights w at each step.

If µ is too small, the algorithm will take

a long time to converge.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

Conversely, if µ is too large, we may

end up bouncing around the error

surface out of control - the algorithm

diverges. This usually ends with an

overflow error in the computer's

floating-point arithmetic.


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

shows E for a range of values of w0 and w1


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

สำหรับ delta rule ใน TLUs จะใช้ activation

แทนค่า output (y) จะได้สมการดังนี้

การปรับค่า weight ของ input แต่ละตัว ตาม

การทำงานของ TLU โดยปรับช่วง output เป็น

-1, 1 จะได้สมการปรับ weight คือ


The threshold logic unit tlu mcculloch pitts 1943 is the simplest model

ถ้าใช้กับ semilinear สมการจะปรับให้สอดคล้อง

กับ sigmoid function โดยเพิ่ม derivative เข้าไปในสมการ


  • Login