1 / 28

Artificial Neuron Model

ARTIFICIAL NEURON. Artificial Neuron Model. ARTIFICIAL NEURON. Artificial Neuron Model Implementation of AND function Let W 1 = W 2 = 1 X 1 X 2 X 1 W 1 + X 2 W 2 Y 0 0 0 0 0 1 1 0 1 0 1 0 1 2 1

georgiav
Télécharger la présentation

Artificial Neuron 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ARTIFICIAL NEURON Artificial Neuron Model

  2. ARTIFICIAL NEURON • Artificial Neuron Model • Implementation of AND • function • Let W1 = W2 = 1 • X1 X2 X1W1 + X2W2 Y • 0 0 0 0 • 0 1 1 0 • 1 0 1 0 • 1 2 1 • If we make  = 2 (or any value >1 but <=2), we will get correct results with a unit step activation function

  3. ARTIFICIAL NEURON Artificial Neuron Model If we place the 4 points in a two coordinate system (X1 and X2), we have drawn a line from (2, 0) to (0, 2) in the resulting plane Any new data falling on the left side of the line will give an output of zero and the data on the right side of the line will be classified as one

  4. ARTIFICIAL NEURON • Artificial Neuron Model • Implementation of OR • function • Let W1 = W2 = 1 • X1 X2 X1W1 + X2W2 Y • 0 0 0 0 • 0 1 1 1 • 1 0 1 1 • 1 2 1 • If we make  = 1 (or any value >0 but <=1), we will get correct results with a unit step activation function

  5. ARTIFICIAL NEURON Artificial Neuron Model If we place the 4 points in a two coordinate system (X1 and X2), we have drawn a line from (1, 0) to (0, 1) in the resulting plane Any new data falling on the left side of the line will give an output of zero and the data on the right side of the line will be classified as one

  6. ARTIFICIAL NEURON Artificial Neuron Model If we want to utilize a unit step function centered at zero for both AND and OR neurons, we can incorporate another input X0 constantly set at –1 The weight W0 corresponding to this input would be the , calculated previously

  7. ARTIFICIAL NEURON Setting of weights (Training) X1 X2 Y 1.0 1.0 1 9.4 6.4 -1 2.5 2.1 1 8.0 7.7 -1 0.5 2.2 1 7.9 8.4 -1 7.0 7.0 -1 2.8 0.8 1 1.2 3.0 1 7.8 6.1 -1

  8. ARTIFICIAL NEURON Training of weights Supervised training: the classes of training samples are known Random initialization of weights (threshold or bias is considered as a weight and its input is fixed at 1)

  9. ARTIFICIAL NEURON Training of weights: Algorithm For each input, calculate the output with the current weights The error will be equal to ydesired – f(xiwi) How to reduce this error? Input is fixed We have to change weights Which weight to change? Since we don’t know which weight is contributing how much to the error, hence we change all weights

  10. ARTIFICIAL NEURON Training of weights: Algorithm How much will be the change in a weight? The change in each connection weight has to be proportional to the error and the magnitude of its input (we assume that each weight is contributing to the error a value proportional to its input) Change each weight by  wi = (y – f(xiwi))xi The learning rate  is fixed at a small value, so that we may not only learn the current data sample, but also the retain the previous learning

  11. ARTIFICIAL NEURON Training of weights: Algorithm Iterate repeatedly over the whole data set. Stop when the combined error of all the inputs is below a certain threshold

  12. ARTIFICIAL NEURON Training of weights For our example let [0.75, 0.5, –0.6] be the initial weights (set randomly) Let the learning rate be 0.2 The first data sample is classified correctly The second data sample gives an error of –2 and the weight vector should be updated Wnew = Wold + 0.2 * Error * X = -3.01 -2.06 -1.00

  13. ARTIFICIAL NEURON Training of weights After 500 iterations the weights converge to [-1.3, -1.1, 10.9] i.e. output = 1.3x1 –1.1x2 + 10.9 = 0

  14. ARTIFICIAL NEURON Training of weights This training rule is called Error-Correction Learning Rule It is usually used for step functions Weights are only adjusted when the neurons give an error at the output  wi = (y – f(xiwi))xi

  15. ARTIFICIAL NEURON Linearly Separable Problems If the data can be correctly divided into two categories by a line or hyper-plane

  16. ARTIFICIAL NEURON Non Linear Problems If the data cannot be correctly separated by a single line or plane, then it is not linearly separable. A single layer of neurons cannot classify the input patterns that are not linearly separable; e.g. exclusive OR problem

  17. ARTIFICIAL NEURON Non Linear Problems For such problems we need two or more layers of neurons -1 0.5 1 -1 -1 -1 x1 1 -0.5 x2 1 -1 -1

  18. ARTIFICIAL NEURON Non Linear Problems The first neuron’s output is Point (0, 0) => Sum = -0.5 and Y1 = 0 Point (0, 1) => Sum = -1.5 and Y1 = 0 Point (1, 0) => Sum = 0.5 and Y1 = 1 Point (1, 1) => Sum = -0.5 and Y1 = 0 It places a line

  19. ARTIFICIAL NEURON Non Linear Problems The second neuron’s output is Point (0, 0) => Sum = 0.5 and Y2 = 1 Point (0, 1) => Sum = -0.5 and Y2 = 0 Point (1, 0) => Sum = 1.5 and Y2 = 1 Point (1, 1) => Sum = 0.5 and Y2 = 1 It places a line

  20. ARTIFICIAL NEURON The input sum for the neuron of the 2nd layer = Y1 – Y2 + 1 For point (0,1) Y1 = 0, Y2 = 0, Sum = 1, Y3 = 0 For point (1,0) Y1 = 1, Y2 = 1, Sum = 1, Y3 = 0 For point (0,0) Y1 = 0, Y2 = 1, Sum = 0, Y3 = 1 For point (1,1) Y1 = 0, Y2 = 1, Sum = 0, Y3 = 1 Thus the neuron of the 2nd layer separates the data correctly

  21. ARTIFICIAL NEURON The first layer projects the input data (x1, x2) into another dimension (Y1, Y2) x2 Y2 Y1 x1 In dimension (Y1, Y2), the data becomes linearly seperable

  22. ARTIFICIAL NEURON Multi Layer Perceptron: Utilization Hence a single neuron with unit step activation function can classify the input into two categories A A = 0 B = 1 B

  23. A = 0 B = 1 ARTIFICIAL NEURON Multi Layer Perceptron: Utilization Two neurons with unit step activation function can classify the input into four categories 00 10 A = 0 B = 1 01 11

  24. ARTIFICIAL NEURON Multi Layer Perceptron: Utilization Two layers of neurons can classify complex types of inputs A B A

More Related