Lecture 8 - Supervised Learning in Neural Networks - (Part 1)
Lecture 8 - Supervised Learning in Neural Networks - (Part 1)
Qadri Hamarsheh
1
Dr. Qadri Hamarsheh
2
Dr. Qadri Hamarsheh
Let 𝐝𝐤 (𝐧) denote some desired response or target response for neuron 𝐤 at
time 𝐧. Let the corresponding value of the actual response (output) of this
neuron be denoted by 𝐲𝐤 (𝐧).
Typically, the actual response 𝐲𝐤 (𝐧) of neuron 𝐤 is different from the
desired response 𝐝𝐤 (𝐧). Hence, we may define an error signal
𝐞𝐤 (𝐧) = 𝐲𝐤 (𝐧) − 𝐝𝐤 (𝐧)
The ultimate purpose of error-correction learning is to minimize a cost
function based on the error signal 𝐞𝐤 (𝐧).
A criterion commonly used for the cost function is the instantaneous value
of the mean square-error criterion
Let wkj(n) denote the value of the synaptic weight wkj at time n. At time n an
adjustment Δwkj(n) is applied to the synaptic weight wkj(n), yielding the
updated value
wkj (n +1) = wkj (n) + Δwkj (n)
The perceptron’ training algorithm
The Perceptron Learning Rule
Perceptrons are trained on examples of desired behavior, which can be
summarized by a set of input-output pairs
{𝒑𝟏, 𝒕𝟏}, {𝒑𝟐, 𝒕𝟐}, … , {𝒑𝑸, 𝒕𝑸}
The objective of training is to reduce the error e, which is the difference
𝒕 – 𝒂 between the perceptron output 𝒂, and the target vector 𝒕.
This is done by adjusting the weights (W) and biases (b) of the perceptron
network according to following equations
𝐖𝐧𝐞𝐰 = 𝐖𝐨𝐥𝐝 + 𝚫𝐖 = 𝐖𝐨𝐥𝐝 + 𝐞𝐏 𝐓
𝐛𝐧𝐞𝐰 = 𝐛𝐨𝐥𝐝 + 𝚫𝐛 = 𝐛𝐨𝐥𝐝 + 𝐞
Where
𝐞 = 𝐭– 𝐚
3
Dr. Qadri Hamarsheh
Diagram of a neuron:
The neuron computes the weighted sum of the input signals and compares
the result with a threshold value, 𝜽. If the net input is less than the threshold,
the neuron output is –1. But if the net input is greater than or equal to the
threshold, the neuron becomes activated and its output attains a value +1.
The neuron uses the following transfer or activation function:
The Perceptron
The operation of Rosenblatt’s perceptron is based on the McCulloch and
Pitts neuron model. The model consists of a linear combiner followed by a
hard limiter.
The weighted sum of the inputs is applied to the hard limiter, which
produces an output equal to +1 if its input is positive and -1 if it is negative.
The aim of the perceptron is to classify inputs, x1, x2, . . ., xn, into one of
two classes, say A1 and A2.
In the case of an elementary perceptron, the n- dimensional space is
divided by a hyperplane into two decision regions. The hyperplane is
defined by the linearly separable function:
4
Dr. Qadri Hamarsheh
where p = 1, 2, 3, . . .
Iteration p here refers to the pth training example presented to the perceptron.
If the error, e(p), is positive, we need to increase perceptron output Y(p), but
if it is negative, we need to decrease Y(p).
The perceptron learning rule
where p = 1, 2, 3, . . .
𝜶 is the learning rate, a positive constant less than unity.
The perceptron learning rule was first proposed by Rosenblatt in 1960.
Using this rule we can derive the perceptron training algorithm for
classification tasks.
5
Dr. Qadri Hamarsheh
Where n is the number of the perceptron inputs, and step is a step activation
function.
Step 3: Weight training
Update the weights of the perceptron
6
Dr. Qadri Hamarsheh