Você está na página 1de 1

Perceptron Learning Procedure

Step 1: Initialize Weights (W 1 . . W n ) and Threshold (W 0 ) Set all weights and threshold to small bipolar random values (). Step 2: Present New Input and Desired Output Present input vector x1 , x 2 , .....x n along with the desired output d(t). Note: ** x0 is a fixed bias and always set equal to 1. ** d(t) takes the value of 1 or 0 and 1.

Step 3: Calculate Actual Output [y(t)] n y(t) = Fh(

wi(t) * xi(t) )
i=0

where Fh (a)

= 1 when a > 0, and = -1 when a <= 0.

Step 4: Adapt Weights wi(t+1) = w i(t) + * [d(t) - y(t)] * xi where 0 < i < n and is the learning rate and usually is a small number ranging from 0 to 1.

Note: wi(t+1) = w i(t) if d(t) = y(t) Step 5: Repeat step 2 to 4 Repeat until the desired outputs and the actual network outputs are all equal for all the input vectors of the training set.

CpE 291/391: PK 2/93 Rev 1

Você também pode gostar