Introduction of Neural Network
Introduction of Neural Network
Course Objectives
• To understand the features of neural network
and its applications
• To learn about the concept of fuzzy logic
components
• To expose the ideas about genetic algorithm
Course Outcomes
• Ability to understand the basics of artificial
neural network and supervised learning
network
• Applying knowledge and understanding of
associative memory networks
• Applying knowledge and understanding of
unsupervised learning network
• Comprehend the fuzzy sets and the concept of
fuzziness involved in various systems
Course Outcomes
• Understand the concepts of fuzzy logic,
knowledge representation using fuzzy rules,
approximate reasoning
• Understand fuzzy concepts and develop a
Fuzzy inference system to derive decisions
• Ability to understand the concepts of genetic
Algorithm
• Apply soft computing techniques for real life
applications
RECOMMENDED BOOKS
Text Book
• S.N. Sivanandam & S.N.Deepa, “Principles of Soft Computing”, 2nd
Edition, Wiley India, 2011.
Reference Book
• Samir Roy and Udit Chakraborty, Introduction to Soft Computing,
Pearson.2013.
• Laurene Fausett, Fundamentals of Neural networks: architectures,
algorithms and applications , Pearson India, 2008
• Ross Timothy J, Fuzzy Logic with Engineering Applications, Wiley India Pvt
Ltd, New Delhi, 2010.
Module-I
Topics
• Introduction to Soft computing
• Neural networks- Introduction, evolution, basic
models, terminologies of ANN,
• Pitts model
• Perceptron
• Adaline
• Back-propagation network
• RBF network
Soft Computing
• Soft computing exploits the tolerance for imprecision,
uncertainty, and partial truth to achieve tractability,
robustness, low solution-cost, and better relationship with
reality
Soft Computing Main Components:
• Approximate Reasoning
• Search & Optimization
Neural Networks, Fuzzy Logic, Evolutionary Algorithms
Hard computing
• Conventional computing
• It requires a precisely stated analytical model
and often a lot of computation time
• Binary logic, crisp systems, numerical analysis
HARD COMPUTING SOFT COMPUTING
Precise, certain and has two valued Imprecise, uncertain and has multi
(Boolean) logic valued logic
Traditional Functional
Symbolic Numerical Approximate Approximation
Logic Modeling and Reasoning and Randomized
Reasoning Search Search
SOME APPLICATION AREAS OF
SOFT COMPUTING
• Data clustering
• Rule generation
• Image processing
• Medical diagnosis
• Pattern recognition
• Social networks
• Distributed computing
• Parallel processing
• Machine learning and
• Granular computing
OVERVIEW OF TECHNIQUES IN SOFT
COMPUTING
• Neural Networks
• Fuzzy Logic
• Genetic Algorithm
• Hybrid Systems
12
Neural Networks
• Neural network was inspired by the design and
functioning of human brain and components.
• Information processing model that is inspired by the
way biological nervous system (i.e) the brain, process
information.
• ANN is composed of large number of highly
interconnected processing elements(neurons)
working in unison to solve problems.
• It is configured for special application such as pattern
recognition and data classification through a learning
process.
• 85-90% accurate.
13
Advantages of Neural Networks
• Adaptive learning
Ability to learn how to do tasks based on the data
given for training or initial experience.
• Self-organization
Creates its own organization or representation of
information it receives during learning time.
• Real time operation
Computations can be carried out in parallel.
• Fault tolerance via redundant information coding
Partial destruction of neural network cause
degradation of performance. In some cases, it can
be retained even after major network damage.
Multi-disciplinary point of view of
Neural Networks
Application Scope of Neural Network
• Air traffic control • Employee hiring
• Animal behaviour • Expert consultants
• Appraisal and valuation of • Fraud detection
property, etc.,
• Hand writing and typewriting
• Betting on horse races, stock
markets • Lake water levels
• Criminal sentencing • Machinery controls
• Complex physical and • Medical diagnosis
chemical process • Music composition
• Data mining, cleaning and • Photos and finger prints
validation • Recipes and chemical formulation
• Direct mail advertisers • Traffic flows
• Echo patterns • Weather prediction
• Economic modeling
Fuzzy Logic
1. An organized method for dealing with imprecise data is called fuzzy
data
• Fuzzy logic includes 0 and 1 as extreme cases of truth (or "the state
of matters" or "fact") but also includes the various states of truth in
between so that, for example, the result of a comparison between
two things could be not "tall" or "short" but ".38 of tallness.“
• Allows partial membership
• Implemented in small, embedded micro controllers to large,
networked, multichannel PC or work station.
• Can be implemented in hardware, software or in both.
• Fuzzy logic provides a simple way to arrive at a definite conclusion
based upon vague, ambiguous, imprecise, noisy or missing input
information.
Genetic Algorithm
• How genes of parents combine to form those of their children.
• Create an initial population of individuals representing possible solutions
to solve a problem
• Individual characters determine whether they are less or more fit to the
population
• The more fit members will take high probability.
• It is very effective in finding optimal or near optimal solutions.
• Generate and test strategy.
• Differ from normal optimization and search procedures in:
Work with coding of the parameter set
Work with multiple points
Search via sampling( a blind search)
Search using stochastic operators
• In business, scientific and engineering circles, etc.,
Hybrid System
Neuro Fuzzy hybrid system
Combination of fuzzy set theory and neural networks
Fuzzy system deal with explicit knowledge that can be explained and
understood
Neural network deal with implicit knowledge acquired by learning
Advantages
Handle any kind of information (Numeric, Linguistic, logical)
Manage imprecise, partial, vague or imperfect information
Resolve conflicts by collaboration and aggregation.
Self-learning, self-organizing and self-tuning capability
No need for prior knowledge of relationship of data
Mimic human decision making system
Computation fast by using fuzzy number operations.
Hybrid System
Neuron genetic hybrid system
Topology optimization
Genetic algorithm used to select a topology for ANN , common one is back
propagation
Genetic algorithm training
Learning of ANN is formulated ad weight optimization problem, usually
mean squared error as a fitness measure
Control parameter optimization
Learning rate, momentum rate, tolerance level. etc., are optimized using
GA.
Hybrid System
Fuzzy genetic hybrid system
Optimization ability of GA are used to best set of rules to be
used for fuzzy inference engine
Creating the classification rules for a fuzzy system where
objects are classified by linguistic terms.
Find the appropriate set of rules
Training data and randomly generated rules are combined to
create initial population
Fitness function measures the strength of rules, balancing the
quality and diversity of the population.
NEURAL NETWORKS
Neural networks design is inspired by the design and
functioning of human brains and components
It has the ability to learn by example
It has made them very flexible and powerful tool
The networks are also well suited for real-time systems
They have fast response and less computational times
They have a parallel architecture
NEURAL NETWORKS
Resembles the characteristic of biological neural network.
Nodes – interconnected processing elements (units or
neurons)
Neuron is connected to other by a connection link.
Each connection link is associated with weight which has
information about the input signal.
ANN processing elements are called as neurons or artificial
neurons , since they have the capability to model networks of
original neurons as found in brain.
Internal state of neuron is called activation or activity level of
neuron, which is the function of the inputs the neurons
receives.
Neuron can send only one signal at a time.
ARCHITECTURE OF A SIMPLE ANN
y in x1w1 x 2 w 2 y f ( y i n ) f : Activation function
X1, X2 : Input neurons Y : Output neuron
X 1 , X 2 transmit signals,Y receives signal
x1
X1
w1
Y y
x2 w2
X2
Nucleus Strands
Axon
Dendrites
Axon Output
BIOLOGICAL NN CONTD…
In the human brain there are approximately 10000 synapses
per neuron
32
Characteristics of ANN
Neurally implemented mathematical model
Large number of interconnected processing elements called neurons exists
here.
Interconnections with weighted linkage hold informative knowledge.
Input signals arrive at processing elements through connections and
connecting weights.
Processing elements can learn, recall and generalize from the given data by
adjustment of weights
Computational power is determined by the collective behaviour of neurons.
ANN is a connection models, parallel distributed processing models, self-
organizing systems, neuro-computing systems and neuro-morphic system
BASIC MODELS OF ARTIFICIAL NEURAL NETWORK
w13
Xn Ym
wn3
38
SINGLE LAYER FEED FORWARD
NETWORK
40
Feedback Network
• If no neuron in the output layer is an input
to a node in the same layer / proceeding
layer – feed forward network.
• If outputs are directed back as input to the
processing elements in the same
layer/proceeding layer –feedback network.
• If the output are directed back to the input
of the same layer then it is lateral
feedback.
• Recurrent networks are networks with
feedback networks with closed loop.
• Fig 2.8 (A) –simple recurrent neural
network having a single neuron with
feedback to itself.
• Fig 2.9 – single layer network with
feedback from output can be directed to
processing element itself or to other
processing element/both.
41
SINGLE NODE WITH ITS OWN
FEEDBACK
Output
Input
Feedback
SINGLE LAYER RECURRENT
NETWORK
X1 w11
Y1
X2 w22
Y2
wnm
Xn Ym
Processing element output can be directed back to the processing element itself or to the
other processing element or both.
Multilayer Recurrent network
• Processing element output
can be directed back to the
nodes in the preceding layer,
forming a multilayer
recurrent network.
• Processing element output
can be directed to
processing element itself or
to other processing element
in the same layer.
44
Learning
Neural network adapts itself to a stimulus by making proper parameter
adjustment, resulting in the production of desired response.
Two broad kinds of learning in ANNs is
Parameter learning – updates connecting weights in a neural net.
Structure learning – focus on change in the networks structure
(Number of processing elements, types of
connection between nodes)
Apart from these, learning in ANN is classified into three categories as
Supervised learning
Unsupervised learning
Reinforcement learning
45
Supervised Learning
Learning with the help of a teacher.
In ANN, each input vector requires a
corresponding target vector, which
represents the desired output.
The input vector along with target vector
is called training pair.
The input vector results in output vector.
The actual output vector is compared with
desired output vector.
If there is a difference means an error
signal is generated by the network.
It is used for adjustment of weights until
actual output matches desired output.
Unsupervised learning
• Learning is performed without the help
of a teacher.
• Example: tadpole – learn to swim by
itself.
• In ANN, during training process,
network receives input patterns and
organize it to form clusters.
• From the Fig. it is observed that no
feedback is applied from environment to
inform what output should be or whether
they are correct.
• The network itself discover patterns,
regularities, features/ categories from the
input data and relations for the input data
over the output.
• Exact clusters are formed by discovering
similarities & dissimilarities so called as
self – organizing.
47
Reinforcement learning
Similar to supervised learning.
Learning based on critic information
is called reinforcement learning &
the feedback sent is called
reinforcement signal.
The network receives some feedback
from the environment.
Feedback is only evaluative.
The external reinforcement signals
are processed in the critic signal
generator, and the obtained critic
signals are sent to the ANN for
adjustment of weights properly to get
critic feedback in future.
48
Activation functions
To make work more efficient and for exact output, some force or activation
is given.
Like that, activation function is applied over the net input to calculate the
output of an ANN.
Information processing of processing element has two major parts
input and output.
An integration function (f) is associated with input of processing element.
This function serves to combine activation, information or evidence from
an external source or other processing elements into a net input to the
processing element
49
Activation functions
1. Identity function:
It is a linear function which is defined as
f(x) =x for all x
The output is same as the input. The input layer uses the identify
activation function
This function used in single layer nets to convert the net input to an output
that is bipolar (+1 or -1).
51
Activation functions
3.Sigmoid function
Back propagation nets.
Two types:
a) binary sigmoid function
logistic sigmoid function or unipolar sigmoid function.
where λ- steepness parameter and the sigmoid range is between -1 and +1.
5. Ramp function
53
54
Important Terminologies
• Weight
– The weight contain information about the input signal.
– It is used by the net to solve the problem.
– It is represented in terms of matrix & called as
connection matrix.
– If weight matrix W contains all the elements of an
ANN, then the set of all W matrices will determine the
set of all possible information processing
configuration.
– The ANN can be realized by finding an appropriate
matrix W
55
Important Terminologies
• Bias
– Bias has an impact in calculating net input.
– Bias is included by adding x0 to the input vector x.
– The net output is calculated by
57
Important Terminologies
• Learning rate
Denoted by α.
Control the amount of weight adjustment at each step of training.
The learning rate range from 0 to 1.
Determine the rate of learning at each step
• Momentum Factor
Convergence is made faster if a momentum factor is added to the weight
updation process.
Done in back propagation network.
• Vigilance parameter
Denoted by ρ.
Used in Adaptive Resonance Theory (ART) network.
Used to control the degree of similarity.
Ranges from 0.7 to 1 to perform useful work in controlling the number of
clusters.
58
Problems -1
For network shown in figure, calculate the net input to the
output neuron.
Problem -2
Calculate the net input for the network shown in figure
Problem -3
• Obtain the output of the neuron Y for the network shown in
figure using activation function
• i. Binary sigmoid ii. Bipolar sigmoid
Problem 3
Solution
𝑛
𝑦𝑖𝑛 = 𝑖 𝑥𝑖 𝑤𝑗
=b+x1W1+x2W2+x3W3 = 0.53
Binary sigmoid activation
= 0.625
Biplolar sigmoid activation function
= 0.259
Mcculloch-Pitts (M-P) neuron
Mcculloch-Pitts (M-P) neuron
Discovered in 1943.
Usually called as M-P neuron.
M-P neurons are connected by directed weighted paths.
Activation of M-P neurons is binary (i.e) at any time step the neuron may
fire or may not fire.
Weights associated with communication links may be excitatory(weights
are positive)/inhibitory(weights are negative).
Fixed threshold for each neuron and if the net input to the neuron is
greater than the threshold then the neuron fires.
They are widely used in logic functions.
64
Mcculloch-Pitts neuron
A simple M-P neuron is shown in the
figure.
It is excitatory with weight (w>0) /
inhibitory with weight –p (p<0).
In the Fig., inputs from x1 to xn possess
excitatory weighted connection and
Xn+1 to xn+m has inhibitory weighted
interconnections.
Since the firing of neuron is based on
threshold, activation function is
defined as
65
Mcculloch-Pitts neuron (Contd…)
For inhibition to be absolute, the threshold with the activation
function should satisfy the following condition:
θ >nw –p
Output will fire if it receives “k” or more excitatory inputs but
no inhibitory inputs where
kw≥θ>(k-1) w
The M-P neuron has no particular training algorithm.
An analysis is performed to determine the weights and the
threshold.
It is used as a building block where any function or
phenomenon is modeled based on a logic function.
66
Problem -4
Implement AND function using McCulloch-pitts neuron
(take binary data).
x1 x2 y
1 1 1
1 0 0
0 1 0
0 0 0
Assume weights be w1 = 1 and w2 = 1.
yin=x1w1+x2w2
(1,1) = l x 1+1 x I =2
(l,0) =1x1 +0 X 1 = 1
(0, 1) = 0 X 1+ 1 X 1 = 1
(0,0) = 0 X 1 +OX 1 = 0
The net input is calculated as 2.
if the threshold value is greater than or equal
to 2 then the neuron fires, else it does nor fire.
So the threshold value is set equal to2((ϴ= 2).
θ ≥ nw –p
n=2, w=1 p=0
ϴ≥2x1-0 => ϴ≥2
Thus , the output of neuron Y can be written
as
ϴ=2, W1=1, W2=1