Слайд 2
![Pachshenko Galina Nikolaevna Associate Professor of Information System Department, Candidate of Technical Science](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-1.jpg)
Pachshenko
Galina Nikolaevna
Associate Professor of Information System Department,
Candidate of Technical Science
Слайд 3
![Week 3 Lecture 3](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-2.jpg)
Слайд 4
![Topics Perceptron The perceptron learning algorithm Major components of a](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-3.jpg)
Topics
Perceptron
The perceptron learning algorithm
Major components of a perceptron
AND operator
OR operator
Neural
Network Learning Rules
Hebbian Learning Rule
Слайд 5
![Machine Learning Classics: The Perceptron](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-4.jpg)
Machine Learning Classics: The Perceptron
Слайд 6
![Perceptron (Frank Rosenblatt, 1957) First learning algorithm for neural networks;](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-5.jpg)
Perceptron
(Frank Rosenblatt, 1957)
First learning algorithm for neural networks;
Originally introduced for
character classification, where each character is represented as an image;
Слайд 7
![In machine learning, the perceptron is an algorithm for supervised](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-6.jpg)
In machine learning, the perceptron is an algorithm for supervised learning of binary classifiers (functions that can decide
whether an input, represented by a vector of numbers, belongs to some specific class or not.
Слайд 8
![The binary classifier defines that there should be only two categories for classification.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-7.jpg)
The binary classifier defines that there should be only two categories for classification.
Слайд 9
![Classification is an example of supervised learning.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-8.jpg)
Classification is an example of supervised learning.
Слайд 10
![The perceptron learning algorithm (PLA) The learning algorithm for the](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-9.jpg)
The perceptron learning algorithm (PLA)
The learning algorithm for the perceptron is
online, meaning that instead of considering the entire data set at the same time, it only looks at one example at a time, processes it and goes on to the next one.
Слайд 11
![Following are the major components of a perceptron:](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-10.jpg)
Following are the major components of a perceptron:
Слайд 12
![Input: All the features become the input for a perceptron.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-11.jpg)
Input: All the features become the input for a perceptron. We denote
the input of a perceptron by [x1, x2, x3, ..,xn], where x represents the feature value and n represents the total number of features. We also have special kind of input called the bias. In the image, we have described the value of the BIAS as w0.
Слайд 13
![Weights: The values that are computed over the time of](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-12.jpg)
Weights: The values that are computed over the time of training the
model. Initially, we start the value of weights with some initial value and these values get updated for each training error. We represent the weights for perceptron by [w1,w2,w3,.. wn].
Слайд 14
![Weighted summation: Weighted summation is the sum of the values](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-13.jpg)
Weighted summation: Weighted summation is the sum of the values that
we get after the multiplication of each weight [wn] associated with the each feature value [xn].
We represent the weighted summation by ∑wixi for all i -> [1 to n].
Слайд 15
![Bias: A bias neuron allows a classifier to shift the](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-14.jpg)
Bias: A bias neuron allows a classifier to shift the decision boundary
left or right. In algebraic terms, the bias neuron allows a classifier to translate its decision boundary. It aims to "move every point a constant distance in a specified direction." Bias helps to train the model faster and with better quality.
Слайд 16
![Step/activation function: The role of activation functions is to make](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-15.jpg)
Step/activation function: The role of activation functions is to make neural
networks nonlinear. For linear classification, for example, it becomes necessary to make the perceptron as linear as possible.
Слайд 17
![Output: The weighted summation is passed to the step/activation function](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-16.jpg)
Output: The weighted summation is passed to the step/activation function and
whatever value we get after computation is our predicted output.
Слайд 18
![Inputs: 1 or 0](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-17.jpg)
Слайд 19
![Outputs: 1 or 0](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-18.jpg)
Слайд 20
![Description: Firstly, the features for an example are given as](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-19.jpg)
Description:
Firstly, the features for an example are given as input to
the perceptron.
These input features get multiplied by corresponding weights (starting with initial value).
The summation is computed for the value we get after multiplication of each feature with the corresponding weight.
The value of the summation is added to the bias.
The step/activation function is applied to the new value.
Слайд 21
![Perceptron](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-20.jpg)
Слайд 22
![Step function](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-21.jpg)
Слайд 23
![Perceptron: Learning Algorithm The algorithm proceeds as follows: Initial random](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-22.jpg)
Perceptron: Learning Algorithm
The algorithm proceeds as follows:
Initial random setting
of weights;
The input is a random sequence.
For each element of class C1, if output = 1 (correct) do nothing, otherwise update weights;
For each element of class C2, if output = 0 (correct) do nothing, otherwise update weights.
Слайд 24
![](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-23.jpg)
Слайд 25
![Perceptron Learning Algorithm We want to train the perceptron to](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-24.jpg)
Perceptron Learning Algorithm
We want to train the perceptron to classify
inputs correctly
Accomplished by adjusting the connecting weights and the bias
Can only properly handle linearly separable sets
Слайд 26
![The perceptron is a machine learning algorithm used to determine](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-25.jpg)
The perceptron is a machine learning algorithm used to determine whether an input belongs to one class or another.
For
example, the perceptron algorithm can determine the AND operator - given binary inputs and , is ( AND ) equal to 0 or 1
Слайд 27
![AND operator](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-26.jpg)
Слайд 28
![AND operator](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-27.jpg)
Слайд 29
![AND operator](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-28.jpg)
Слайд 30
![The AND operation between two numbers. A red dot represents](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-29.jpg)
The AND operation between two numbers. A red dot represents one
class ( AND ) and a blue dot represents the other class ( AND ). The line is the result of the perceptron algorithm, which separates all data points of one class from those of the other.
Слайд 31
![OR operator](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-30.jpg)
Слайд 32
![OR operator](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-31.jpg)
Слайд 33
![XOR Not linearly separable sets](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-32.jpg)
XOR
Not linearly separable sets
Слайд 34
![XOR Not linearly separable sets](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-33.jpg)
XOR
Not linearly separable sets
Слайд 35
![Character classification](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-34.jpg)
Слайд 36
![Character classification 1 – 001001001001001 …………………………………. 9 – 111101111001111 0 – 111101101101111](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-35.jpg)
Character classification
1 – 001001001001001
………………………………….
9 – 111101111001111
0 – 111101101101111
Слайд 37
![Neural Network Learning Rules We know that, during ANN learning,](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-36.jpg)
Neural Network Learning Rules
We know that, during ANN learning, to change
the input/output behavior, we need to adjust the weights. Hence, a method is required with the help of which the weights can be modified. These methods are called Learning rules, which are simply algorithms or equations.
Слайд 38
![Hebbian Learning Rule This rule, one of the oldest and](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-37.jpg)
Hebbian Learning Rule
This rule, one of the oldest and simplest, was
introduced by Donald Hebb in his book The Organization of Behavior in 1949.
It is a kind of feed-forward, unsupervised learning.
Слайд 39
![The Hebbian Learning Rule is a learning rule that specifies](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-38.jpg)
The Hebbian Learning Rule is a learning rule that specifies how
much the weight of the connection between two units should be increased or decreased in proportion to the product of their activation.
Слайд 40
![Rosenblatt’s initial perceptron rule Rosenblatt’s initial perceptron rule is fairly](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-39.jpg)
Rosenblatt’s initial perceptron rule
Rosenblatt’s initial perceptron rule is fairly simple and
can be summarized by the following steps:
Initialize the weights to 0 or small random numbers.
For each training sample:
Calculate the output value.
Update the weights.
Слайд 41
![Perceptron learning rule The weight adjustment in the perceptron learning](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-40.jpg)
Perceptron learning rule
The weight adjustment in the perceptron learning rule is
performed by
Wi+1 := wi + η(y − o)xi
where η > 0 is the learning rate, y is he desired output,
o ∈ {0, 1} is the computed output, x is the actual input to the neuron.
Слайд 42
![Step 1 η > 0 is chosen, range [0,5; 0,7].](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-41.jpg)
Step 1 η > 0 is chosen, range [0,5; 0,7].
where
η > 0 is the learning rate
Слайд 43
![Step 2 Weigts are initialized at small random values, The](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-42.jpg)
Step 2 Weigts are initialized at small random values,
The running
error E is set to 0
Слайд 44
![Step 3 Training starts here. For each element of class](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-43.jpg)
Step 3 Training starts here.
For each element of class C1, if
output = 1 (correct) do nothing, otherwise update weights;
For each element of class C2, if output = 0 (correct) do nothing, otherwise update weights.
Слайд 45
![Step 4 Weights are updated](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-44.jpg)
Step 4
Weights are updated
Слайд 46
![Step 5 Cumulative cycle error is computed by adding the present error to initial error.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-45.jpg)
Step 5 Cumulative cycle error is computed by adding the present
error to initial error.
Слайд 47
![Step 6 If i](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-46.jpg)
Step 6
If i < N then i := i +
1 and we continue the training by going back to Step 3, otherwise we go to Step 7
Слайд 48
![Step 7 The training cycle is completed. For errow E](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-47.jpg)
Step 7 The training cycle is completed. For errow E =
0 terminate the training session. If E > 0 then E is set to 0, N := 1 and we initiate a new training cycle by going to Step 3
Слайд 49
![The output value is the class label predicted by the](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-48.jpg)
The output value is the class label predicted by the unit
step function that we defined earlier.
Слайд 50
![The value for updating the weights at each increment is calculated by the learning rule](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-49.jpg)
The value for updating the weights at each increment is calculated
by the learning rule
Слайд 51
![Hebbian learning rule – It identifies, how to modify the](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/29450/slide-50.jpg)
Hebbian learning rule – It identifies, how to modify the weights of
nodes of a network.
Perceptron learning rule – Network starts its learning by assigning a random value to each weight.