1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

13
1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y

Transcript of 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Page 1: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

1st Neural Network: AND function

Threshold(Y) = 2

X1

Y

X2

1

1

1

2

Y

Page 2: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

1st Neural Network: OR function

X1

Y

X2

2

2

Threshold(Y) = 2

1

2

Y

Page 3: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

1st Neural Network: AND not function

Threshold(Y) = 2

1

2

Y

X1

Y

X2

2

-1

Page 4: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

1st Neural Network: XOR function

X1

Y

X2

2

-1

Z2

Z1

2

-12

2

Threshold(Y) = 2

1

2

Y

Page 5: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Modeling a neuron

j

jiji aWin ,

aajj :Activation value of unit j:Activation value of unit j

wwj,Ij,I :Weight on the link from unit j to :Weight on the link from unit j to

unit iunit i ininII :Weighted sum of inputs to unit i:Weighted sum of inputs to unit i

aaII :Activation value of unit i:Activation value of unit i

gg :Activation function:Activation function

Page 6: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Activation Function

StepSteptt(x)(x) == 1 if x >= t, else 01 if x >= t, else 0

Sign(x)Sign(x) == +1 if x >= 0, else –1+1 if x >= 0, else –1 Sigmoid(x)Sigmoid(x) == 1/(1+e1/(1+e-x-x))

Page 7: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Simple Network

Page 8: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Learning (training)

Learning in ANN is adjusting the connection weight between neurons. Knowledge is stored in this weight matrices.

Page 9: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Training Methods Unsupervised Learning (learning without

teacher or learning by doing) Supervised Learning (learning with

teacher) Back propagation

It’s similar to Supervised Learning but the error signal is used to adjust the weight.

Page 10: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Simple TrainingWhile (epoch produces an error) {

// give the next input

Error = Target – Output;

If (Error <> 0)

Weightj+1 = Weightj + LearningRate * Inputj * Error;

}

Epoch : Presentation of the entire training set to the neural network.

Page 11: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Example

AND Input X 0 0 1 1 Input Y 0 1 0 1 Output 0 0 0 1

Page 12: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

ANN Design: How to arrange neurons in various layers How to connect neuron from different layer How the neurons get input(s) and give

result(s) Learning rate value Using bias or not How to train the ANN

Page 13: 1 st Neural Network: AND function Threshold(Y) = 2 X1 Y X2 1 1 1 2 Y.

Applications: Prediction

Currency, stock exchange, weather, etc. Classification

Pattern, shape, etc.