Notes ML 24 Slides RNN ANN
Notes ML 24 Slides RNN ANN
Part-1
Dendrites: Input
Cell body: Processor
Synaptic: Link
Axon: Output
How do our brains work?
A processing element
The axon endings almost touch the dendrites or cell body of the
next neuron.
How do our brains work?
A processing element
Neurotransmitters are chemicals which are released from the first neuron
and which bind to the Second.
How do our brains work?
A processing element
Processing ∑
∑= X1+X2 + ….+Xm =y
Output y
How do ANNs work?
Not all inputs are equal
............
xm x2 x1
Input
wm ..... w2 w1
weights
Processing ∑ ∑= X1w1+X2w2 + ….+Xmwm
=y
Output y
How do ANNs work?
The signal is not passed down to the
next neuron verbatim
............
xm x2 x1
Input
wm ..... w2 w1
weights
Processing ∑
Transfer Function
f(vk)
(Activation Function)
Output y
The output is a function of the input, that is
affected by the weights, and the transfer
functions
Three types of layers: Input, Hidden, and
Output
Artificial Neural Networks
An ANN can:
1. compute any computable function, by the appropriate
selection of the network topology and weights values.
2. learn from experience!
Specifically, by trial‐and‐error
McCulloch-Pitts neuron
A neuron fires (i.e., has value 1 on its output line) at time t+1 if
the weighted sum of inputs at t reaches or passes q:
y(t+1) = 1 if and only if wixi(t) q.
From Logical Neurons to Finite Automata
1 Brains, Machines, and
AND 1.5 Mathematics, 2nd Edition,
1987
1 Boolean Net
1
X Y
OR 0.5
NOT X
0 Finite
-1 Automaton
Y Q
McCulloch-Pitts Neuron Model
General symbol of neuron
consisting of processing node and
synaptic connections
Neuron Modeling for ANN
Is referred to activation function. Domain is
set of activation values net.
Unipolar Binary
Common models of neurons
Binary
perceptrons
Continuous perceptrons
Classification based on interconnections
Interconnections
Multilayer Multilayer
Single layer Feedforward
Network
Feedforward Network
• Its output and input vectors are
respectively
where
EXAMPLE
Multilayer feed forward network
Neural
X Network Y
W
(Input) (Actual output)
Error
Error
(D-Y) Signal
signals Generator (Desired Output)
Supervised learning contd.
Supervised learning
does minimization of
error
Unsupervised Learning
• How a fish or tadpole learns
• All similar input patterns are grouped together as
clusters.
• If a matching input pattern is not found a new
cluster is formed
Unsupervised learning
Self-organizing
• In unsupervised learning there is no
feedback
• Network must discover patterns,
regularities, features for the input data
over the output
• While doing so the network might change
in parameters
• This process is called self-organizing
Reinforcement Learning
X
Y
NN
(Input) W (Actual output)
Error
signals Error
Signal R
Generator Reinforcement signal
When Reinforcement learning is
used?
• If less information is available about the
target output values (critic information)
• Learning based on this critic information is
called reinforcement learning and the
feedback sent is called reinforcement
signal
• Feedback in this case is only evaluative
and not instructive
Some learning algorithms we will
learn are
• Supervised:
• Adaline, Madaline
• Perceptron
• Back Propagation
• multilayer perceptrons
• Radial Basis Function Networks
• Unsupervised
• Competitive Learning
• Kohenen self organizing map
• Learning vector quantization
• Hebbian learning
Neural processing
• Recall:- processing phase for a NN and its
objective is to retrieve the information. The
process of computing o for a given x
• Basic forms of neural information
processing
– Auto association
– Hetero association
– Classification
Neural processing-Autoassociation
• Set of patterns can be
stored in the network
• If a pattern similar to
a member of the
stored set is
presented, an
association with the
input of closest stored
pattern is made
Neural Processing-
Heteroassociation
• Associations between
pairs of patterns are
stored
• Distorted input pattern
may cause correct
heteroassociation at
the output
Neural processing-Classification
• Set of input patterns
is divided into a
number of classes or
categories
• In response to an
input pattern from the
set, the classifier is
supposed to recall the
information regarding
class membership of
the input pattern.
Important terminologies of ANNs
• Weights
• Bias
• Threshold
• Learning rate
• Momentum factor
• Vigilance parameter
• Notations used in ANN
Weights
• Each neuron is connected to every other
neuron by means of directed links
• Links are associated with weights
• Weights contain information about the
input signal and is represented as a matrix
• Weight matrix also called connection
matrix
Weight matrix
W= w1T
T
w11w12 w13...w1m
w
w
2
w21w22 w23...w2 m
T
3
.
. = ..................
.
.
...................
.
T
wn wn1wn 2 wn 3...wnm
Weights contd…
• wij –is the weight from processing element ”i” (source
node) to processing element “j” (destination node)
1
y x w
inj i ij
i 0
X1 bj
x 0 w0 j x1w1 j x 2w2 j .... x n wnj
w1j
n
Xi Yj w0 j x i wij
wij i 1
n
Xn wnj
y b x w
inj j i ij
i 1
Activation Functions
• Used to calculate the output response of a
neuron.
• Sum of the weighted input signal is applied with
an activation to obtain the response.
• Activation functions can be linear or non linear
• Already dealt
– Identity function
– Single/binary step function
– Discrete/continuous sigmoidal function.
Bias
• Bias is like another weight. Its included by
adding a component x0=1 to the input
vector X.
• X=(1,X1,X2…Xi,…Xn)
• Bias is of two types
– Positive bias: increase the net input
– Negative bias: decrease the net input
Why Bias is required?
• The relationship between input and output
given by the equation of straight line
y=mx+c
c (bias)
Input X Y y=mx+C
Threshold
• Set value based upon which the final output of
the network may be calculated
• Used in activation function
• The activation function using threshold can be
defined as
1......ifnet q
f ( net )
1...ifnet q
Learning rate
• Denoted by α.
• Used to control the amount of weight
adjustment at each step of training
• Learning rate ranging from 0 to 1 which
determines the rate of learning in each
time step
Other terminologies
• Momentum factor:
– used for convergence when momentum factor
is added to weight updation process.
• Vigilance parameter:
– Denoted by ρ
– Used to control the degree of similarity
required for patterns to be assigned to the
same cluster
Thank you for Listening