Professional Documents
Culture Documents
Lecture 4
M-P Neuron Model
The McCulloch-Pitts neuron was the earliest neural network
discovered in 1943.
The M-P neurons are connected by directed weighted paths.
The activation function of an M-P neuron is binary, that is,
at any time step the neuron may fire or may not fire.
The weights associated with the communication links may
be excitatory (weight is positive) or inhibitory (weight is
negative).
M-P Neuron Model
There is a fixed threshold for
each neuron, and if the net
input to the neuron is greater
than the threshold then the
neuron fires.
Connection is excitatory with
weight w (w > 0) or inhibitory
with weight –p (p < 0).
Here, yin is net input.
Activation function is:-
M-P Neuron Model
The M-P neuron has no particular training algorithm.
An analysis has to be performed to determine the values of
the weights and the threshold.
Here the weights of the neuron are set along with the
threshold to make the neuron perform a simple logic
function.
The M-P neurons are used as building blocks on which we
can model any function or phenomenon, which can be
represented as a logic function.
Example 1
Implement AND function using M-P Neuron Model:
What is the 1st thing we need for implementation?
(Training Data)
The truth table for AND function is:
X1 X2 Y
1 1 1
1 0 0
0 1 0
0 0 0
Example 1 (AND using M-P)
How AND function is represented?
Y = X1 . X2
w2
X2
Example 1 (AND using M-P)
Now we know what we need, weights and threshold.
In M-P Neuron model, our basic assumptions are:
Here we do only analysis
Threshold will work as activation function
Weights can be excitatory (+ve) or inhibitory (-ve)
Possible combinations are (both positive) (1 positive 1 negative) (both
negative)
We will take the value of weights 1
So possible weights are (+1, +1) (+1, -1) (-1, +1) (-1, -1)
We will use one from these combinations and try to set the
threshold for solving the problem.
Example 1 (AND using M-P)
Start by talking weights as w1=+1 and w2=+1
Next steps are:
We will calculate the net input(Yin) at neuron Y.
Try to set the Threshold θ such that Yin can be converted into Y.
=+1
Example 2
Implement M-P Neuron Model for the function
Y = X1X2’
X1 w1
θ
f Y
w2
X2
Example 2
Start by talking weights as w1=+1 and w2=+1
Next steps are:
We will calculate the net input(Yin) at neuron Y.
Try to set the Threshold θ such that Yin can be converted into Y.
X Z V21
2 W22 2
θ2
Example 3
O/ Net
I/P Weights If θ = 1
P I/P
For Z1
X1 X2 Z1 W11 W21 Z1in Output is
1 1 0 +1 -1 0 0
1 0 1 +1 -1 1 1
0 1 0 +1 -1 -1 0 O/ Net
I/P Weights If θ = 1
P I/P
0 0 0 +1 -1 0 0
X1 X2 Z2 W12 W22 Z2in Output is
1 1 0 -1 +1 0 0
1 0 0 -1 +1 -1 0
For Z2 0 1 1 -1 +1 1 1
0 0 0 -1 +1 0 0
Example 3
Now, we will solve our 3rd sub-problem.
We knows the value of Z1 and Z2.
Y = Z1 + Z2 Here Yin is calculated as:
Yin = Z1V1 + Z2V2
X1 X2 Y Z1 Z2 V1 V2 Yin Output θ=1
1 1 0 0 0 +1 +1 0 0
1 0 1 1 0 +1 +1 1 1
0 1 1 0 1 +1 +1 1 1
0 0 0 0 0 +1 +1 0 0
Same
as
Example 3
So the Neural net for XOR function is:
θ1 =1
X W11=+1 Z
1 1 V11=+1
W12=-1 θ3= 1
Y
W21=-1
X Z V21=+1
2 W22=+1 2
θ2=1
Exercises
Implement M-P neuron for following logic functions:
OR
NAND
XNOR