00:00hidden layer in a perceptron model or we can say a single layer perceptron that we will
00:07be seeing shortly the term single layer perceptron you will learn shortly.
00:12Now this is so what was the main aim of designing this perceptron initially when the perceptron
00:19was designed it was designed to solve a logical problems such as and or nor problems basically
00:27which has an binary output. So, here is the representation of an perceptron. Now if you
00:35look into an these models if you look into and or or nor if you see this we have an
00:44binary
00:45inputs. So, because there is an binary input let us take we have a 2 inputs x1 and x2 if
00:53you look into 0 0 0 1 1 0 1 1. So, since you have a 2 inputs here it
01:00is there are the 2
01:01neurons x1 and x2 and the output of this if you consider it as and gate 0 0 it is
01:090 it
01:10is 0 0 and 1 1 it is 1. So, since the output is either 0 or 1 we just
01:17have we will have
01:19only one neuron at an output layer. So, when you pass an input. So, when you understand this
01:25you have an x1 and x2. So, you are passing it to an neuron where you have a summation operation
01:34and you have an activation function operation. So, the very first operation what we are going
01:38to do is an summation. So, how do we perform a summation? We have x1 multiplied with its weight,
01:44x2 multiplied with its weight and then we have also and then we have also seen that there
01:50is a bias item that is been added to it. So, this is what is the summation part and the
01:56result of this summation the z value is given to an activation function and here the activation
02:02function that is used in perceptron will be either a step activation function or it is an
02:09a threshold activation function. Now, what is a step activation function? If
02:14the resultant value if the z value is less than 0 then the output will be 0. If the z
02:22value
02:22is greater than or equal to 0 the output is 1. So, that is what is a step activation function.
02:29Then we have a threshold instead of 0 here we can have some threshold value. If the resultant
02:35if the summation resultant is greater than or equal to certain threshold value we get one
02:41output, if it is less than a threshold value we get an other output. So, from this what
02:46are we understanding? It is a perceptron, it is an supervised it is an first and oldest neural
02:53network model mainly designed for a supervised learning. It is used to solve a binary classification,
02:59it is mainly designed to solve a binary classification problems only. So, what are the different components
03:05of a perceptron? We have an input and we have the weights associated with each of the input,
03:12we have an weighted sum where we add the bias term also and then the resultant of the weighted
03:19sum is being passed to an activation function and the activation function that is used in
03:25a perceptron will be either a step activation or a threshold activation and then we are going
03:29to get an output. So, this is what is the perceptron? So, let us understand this what we have seen
03:35mathematically sometime but let us understand this with a simple example. If our suppose
03:41there is a requirement where you want to classify whether given input is a spam or whether it is
03:48not a spam. For that we have 3 input features. One is how many number of number of suspicious words,
03:56let us take it as x1 and what is the percentage of capital letters that are used in the subject,
04:04that is our second feature x2 and if there are how many number of links that are available which is
04:09given as x that is our third feature x3. Because we have our 3 input x1 whose value is 4,
04:17x2 value is 0.2
04:19and x3 the value is 2. So, if you consider our data set, if we have 3 features where we
04:27have x1, x2
04:29and x3 where x1 is number of suspicious words and x2 is the percentage of capital letters and x3 is
04:39the number of links.
04:40And the very for the first input we have the value 4, 0.2 and we have the input 2.
04:47Let us assume you have a data set like this.
04:49So, how do you design a neural network for this? Since you have a 3 features, we are going to
04:56have a 3.
04:56Now, since it is an perception, there is only an input layer and you just have only an output layer.
05:04So, since it is a binary classification, you are going to have only one neuron at an output layer. So,
05:12this is an input and this is an output. Now, you are going to establish a connection from one,
05:19you are going to establish a connection and we are going to have a weights on each of these connection.
05:25So, since we have a 3 inputs, there are 3 weights. Now, what are those values? Here are the values.
05:32What is the w1 value? 0.8, w2 value 0.5 and w3 value 0.3. And what exactly the
05:40operation takes place
05:41here? We have a summation and we will have an activation. What is the summation here? It is x1,
05:47w1 plus x2, w2 plus x3, w3 and we know that there is a bias term that is being added.
05:56So, just substitute
05:57the values. What is the x1 value? x1 value is 4 and w1 value is 0.8 and x2 value
06:04is 0.2 and w2 value
06:06is 0.5. x3 value is 2 and w3 value is 0.3 and then we are adding a bias
06:12term. What is the bias value
06:14given? Bias value given here is 0.5. So, when we perform this entire operation,
06:20the resultant value what we are getting is 4.4. Now, once we get the summation,
06:28the resultant of this is then passed to an activation function. Now, what is a role of an
06:34activation function? Here, it can be either a step activation function or it is a threshold
06:40activation function. So, here we are taking a threshold activation function and what is a
06:45threshold that we have fixed? The threshold that we have fixed is 3. Now, what is the summation
06:51value that we have got? The summation value what we have got is a 4.4. Now, that is being
06:56compared
06:56with the threshold. What is the threshold value? The threshold value is
Comments