2 - Neural Network
2 - Neural Network
BERHAMPUR
A Course on
SOFT COMPUTING
Prepared By
Mr. Suryalok Dash
Asst. Professor, Dept. of Electrical Engineering.
Mr. Suryalok Dash
2 PMEC- Berhampur 11/13/2018
Artificial Neural Network
(ANN)
Localized Distributed
Computing Centralized Distributed
Sequential Parallel
Stored Programs Self-Learning
Reliability Very Vulnerable Robust
Expertise Numerical and Symbolic Perceptual Problems
Manipulations
Operating Environment Well-Defined Poorly Defined
where f is the node’s activation function, x1, x2, . . . , xl are the node’s inputs,
w1k, w2k, . . . , wlk are the connections weights, and θk is the node’s
threshold.
The bias effect (threshold value) is intended to occasionally inhibit the activity of
some nodes.
The activation functions can take different forms: sigmoid mapping, signum
function, step function or linear correspondence.
The mathematical representation for some of these mappings are:
Unsupervised learning:
Unsupervised or self-organized learning does not involve an external teacher
and relies instead upon local information and internal control.
The training data and input patterns are presented to the system, and through
predefined guidelines, the system discovers emergent collective properties and
organizes the data into clusters or categories.
It collects the incoming signals x1, x2, . . . , xl, multiplies them by corresponding
weights w1, w2, . . . , wl and compares the result with a predetermined bias θ before
applying activation function resulting in the output o.
Mr. Suryalok Dash
28 PMEC- Berhampur 11/13/2018
The output is expressed by
If the weighted sum of the different signal inputs, is larger than the bias θ, then
an output value of 1 is generated, otherwise the result is zero. This is done
through the step activation function.
Note:
McCulloch-Pitts neuron allows binary 0 or 1 states only ie.it is binary activated
The weights could be excitatory (positive) or inhibitory (Negative).
model topology is based on a fixed set of weights and thresholds
This model are most widely used in case of logic function.
Notice here the absence of any type of learning since there is no updating
mechanism for the synaptic weights once the system has been presented with a
set of training input–output data.
Mr. Suryalok Dash
29 PMEC- Berhampur 11/13/2018
Example: X1 X2 O
Implement AND function using M-P neuron. 0 0 0
0 1 0
1 0 0
Solution:
1 1 1
Assume weights W1 and W2 =1 and θ=0. With this assumed weight, the net input
for four inputs are:
Yin = 0 (for input 0,0), Yin = 1 (for input 0,1)
Yin = 1 (for input 1,0), Yin = 2 (for input 1,1)
Hence, if we set the threshold of the activation function anything > 1 and < 2, we
will get desired output.
Alternate solution: w1=1, w2=1, θ= -1, threshold =0.1
Note: There are many such solutions !
Solution:
Let’s Initialize the weight to
random values w1=0 and
w2=0 with Bias =0
Also assume, η =0.3
Epoch -2
-1 -1 1 -1 -0.6 -1 0 0 0 0.6 0.6 -0.6
In the two-dimensional case, this translates into finding the line given by w1x1 + w2x2
− θ = 0, which after learning should adequately classify the patterns.
Mr. Suryalok Dash
44 PMEC- Berhampur 11/13/2018
On training, if the weights of training input vectors of correct response +1 lie on one
side of the boundary and that of -1 lie on the other side of the boundary, then the
problem is linearly separable.
XOR
AND
(1,0) (1,1)
(1,0) (1,1)
where,
This is the cumulative error for all patterns k’s (k = 1 . . . n) between the desired
response t k and the actual output of the linear combiner.
The weights are updated individually according to the formulae
where α(k) is the adaptive learning rate (strictly positive value smaller than
unity) and Nc(k) is the neighborhood of the unit c at iteration k
Step 5: The learning rate and the neighborhood are decreased at every iteration according
to an appropriate scheme. For instance, Kohonen suggested a shrinking function in the
form of α(k) = α(0)(1 − k/T), with T being the total number of training cycles and α(0)
the starting learning rate bounded by one.
Step 6: The learning scheme continues until a sufficient number of iterations has been
reached or until each output reaches a threshold of sensitivity with respect to a portion of
the input space.