Department of Electronics & Electrical Engineering: Ec5245: Artificial Neural Network & Fuzzy Logic
Department of Electronics & Electrical Engineering: Ec5245: Artificial Neural Network & Fuzzy Logic
Modes of Learning
• Learning is usually carried on in one of two modes; online or off-
line.
• In On-line learning: weights are updated after processing each
training case, then the used case is discarded.
• In Off-line learning: weights are updated after ALL the training data
is processed, hence, data is stored and accessed multiple times.
• Batch learning is done off-line.
26/6/2018 Hiba Hassan: U of K 4
Training of RNN
• Training of Elman RNNs deploy a modified version of the
backpropagation algorithm, called Backpropagation Through Time
(BPTT).
• The gradient at each output depends on calculations of the previous
time step as well as those of current time step. However, more
advanced architectures is capable of utilizing several time steps using
the BPTT algorithm.
• For example; to calculate the gradient at t = 3, we need to
backpropagate 2 steps and sum up the gradients.
• However, simple RNN, also known as vanilla RNN, have limitations
regarding learning long-term dependencies.
• The solution to this flaw have led to many evolved RNNs, such as Long
Short Term Memory (LSTM) RNN, which have selective memory (so to
speak).
26/6/2018 Hiba Hassan: U of K 13
Cont.
• The input p to this network just supplies the initial conditions.
The Hopfield network uses the saturated linear transfer
function satlins.
RBFNN (cont.)
• The net input to the RBF transfer function is a vector distance
between its weight vector w and the input vector p, multiplied by
the bias b. The box ||dist||, accepts the input vectors p and the
single row input weight matrix, and produces the dot product of the
two.
• The transfer function of a RBF neuron is defined as:
radbas(n) e - n2
26/6/2018 Hiba Hassan: U of K 23
RBFNN (cont.)
• As the distance between w and p decreases, the output increases.
• Thus, a RB neuron acts as a detector that produces 1 whenever
the input p is identical to its weight vector w.
• The bias b allows the sensitivity of the RB neuron to be adjusted.
26/6/2018 Hiba Hassan: U of K 24
Two unnormalized Gaussian radial basis functions in one input dimension. The basis
function centers are located at c1=0.75 and c2=3.25.
26/6/2018 Hiba Hassan: U of K 25
x u i 2
wi Ri x u i exp
2 i2
Each training input xi serves as a center for the basis function, Ri.
Thus, the Gaussian interpolation radial basis function network
(RBFN) is:
n x x i 2
d ( x) ci exp
i 1 2 i
2
Where ci is the output value associated with the ith receptive field
and i = 1 ,…..,n.
26/6/2018 Hiba Hassan: U of K 28
H H
H H c w c R ( x)
i i i i
d ( x) ci wi ci Ri ( x) or d ( x) i 1
H
i 1
H
i 1 i 1
w
i 1
i R ( x)
i 1
i
26/6/2018 Hiba Hassan: U of K 29
RBFN Training
• Several training techniques are used for optimal selection of the
parameters vectors ci and wi. Some of them are:
i. Random selection (results in fixed centers).
ii. Deploying self-organized methodology.
iii. Adopting supervised learning processes.
• An RBFN's approximation capacity may be further improved with
supervised adjustments of the center of the shape of the receptive field (or
radial basis) functions.
• Several learning algorithms have been proposed to identify the parameters,
and to update all modifiable parameters. Linear parameters can be updated
using the least squares method or the gradient method.
26/6/2018 Hiba Hassan: U of K 30
Random Selection
• Results in fixed centers of RBFs of the hidden units.
• The locations of the centers could be randomly chosen from the
training data set. Different values of centers and widths are used
for each radial basis function.
• Hence, trialing with training data is required.
• The output layer weight value is usually learned by a technique
called pseudo-inverse.
• The main problem with random selection is that it requires a large
training set for optimal performance.
26/6/2018 Hiba Hassan: U of K 31
Self-Organized Selection
• Usually deploys hybrid learning:
• The centers of hidden layer RBFs are learned using self-
organized clustering techniques, example: k-means.
• The output layer linear weights are estimated via supervised
learning, thus using LMS algorithm.
26/6/2018 Hiba Hassan: U of K 32
RBFN Fitting:
• Set σ =1.0 for both exponential and Gaussian basis functions.
wi Ri x xi
• When the basis functions do not have enough overlap, the
weighted sum of the hidden outputs may generate curves that are
not smooth enough.
26/6/2018 Hiba Hassan: U of K 33
RBFN Fitting:
• An example of Radial Basis Algorithm is the following two-layer
network.
• The first layer has radial basis neurons. The net input functions
calculate a layer's net input by combining its weighted inputs and
biases.
• The second layer has pure linear neurons. The net input functions
calculate a layer's net input by combining its weighted inputs and
biases.
26/6/2018 Hiba Hassan: U of K 34
RBFN Fitting:
• Both layers have biases. Initially the radbas layer has no neurons.
The following steps are repeated until the network's mean
squared error falls below goal.
• The network is simulated.
• The input vector with the greatest error is found.
• A radbas neuron is added with weights equal to that vector.
• The pure linear layer weights are redesigned to minimize error.
26/6/2018 Hiba Hassan: U of K 35
RBFNN
• Consider the following RBFNN;
26/6/2018 Hiba Hassan: U of K 42
Cont.
• When the input falls within a small local region of the
input space, the radial basis functions, in the hidden
layer, produce a noticeable response.
• Each hidden unit owns a unique receptive field in input
space.
• An input vector xi that lies in the receptive field for center
cj, could activate cj and obtain the target output by proper
choice of weights. The output is given by,
Cont.
• There are several radial functions, some of them are,
• Where