00:00What is the target?
00:01The ground truth is already known to us, target is 1 and what is computed?
00:06Computed is something which the model has predicted 0, so the result what we are getting
00:11is 1.
00:12So, because there is an error, now what is that we do?
00:16We come back and once we come back, what is that we have to, why is that you want to
00:21come
00:21back?
00:22You are going to update the weights and you are going to update the bias because the weights
00:28and bias are something which are randomly initialized, when it is randomly initialized maybe it is
00:35not a correct value.
00:37So, because it is a randomly initialized, we have to come back and then update, how is that
00:42we update?
00:43What is the weight updation formula?
00:46Now, the weight updation formula is this, the new weight is old weight plus delta WF.
00:55What is the delta WF?
00:56Delta WF is there is a learning rate and whatever is the error that we have calculated, target
01:02minus computed and then you will multiply it with its weight because which weight we want
01:07to update.
01:08So, if you are updating this W1, W1 is the weight associated with this input x1.
01:14So, for which input you are updating that weight?
01:17So, that input is also written here.
01:20So, this is the weight updation formula, very very important to concept.
01:24W new is equal to W old plus delta W.
01:28What is this delta W?
01:29It is a learning rate multiplied with error that is target minus computed and multiplied with
01:36its inputs with its input x.
01:38This is how you update the weights, but we have bias also.
01:42So, how is that we update the bias, same formula, the new bias value is old bias value plus the
01:52learning rate multiplied with the target minus computed.
01:56Now, you can ask the question why we do not have B or like how we have xi, y we
02:03do not have
02:04any term, by default it is always 1.
02:06So, because of this we will not be writing anything here.
02:10So, this is the weight updation formulas, you once you get the output, we are going to calculate
02:18the error.
02:19If the error is more, we are coming back and then we are updating the weights, how are we
02:24updating the weights?
02:25The weight updation formula is W new is W old plus change in the delta W.
02:31What is delta W?
02:32Delta W is learning rate error multiplied with the input, similar way we are going to update
02:37the bias also and the formula for bias is new bias is old bias plus learning rate and the
02:45error.
02:45So, this concept let us understand by using a simple numerical example.
02:53Now, let us see there are 2 inputs x1 and x2 and these 2 inputs values are 1.1 and
03:032 and
03:04what exactly mean by this?
03:06We have an data which is x1 and we have x2, x1 value is this and we have the target
03:14which
03:14is denoted as y and this value is 1.
03:17So, this is the input and this is the ground truth for this input.
03:21Now, let us solve this particular problem, what is the first step?
03:27You need to calculate z, how is that we calculate z?
03:30x1 multiplied with W f, x2 multiplied with W f and the bias term.
03:36What is x1?
03:37x1 value is 1 and what is the W1 value 0.2 plus x2 the value is 2 and what
03:44is W2 minus
03:460.5 plus and there is a bias term which is 0.1.
03:51So, this is the data which we have initialized and then the very first step is you are calculating
03:57z.
03:58So, when we solve this problem, so you can solve along with me.
04:01So, we are going to get the value.
04:05So, this is minus 0.7.
04:09So, we got z value as minus 0.7.
04:12Now, what is the next step?
04:14That is a pass to an activation function in our neuron, first step is a summation and
04:19second is an activation.
04:20So, we have calculated the summation part.
04:22Now, what is an activation function?
04:24So, look at the activation function what we have taken, if the value is less than or equal
04:29to 0, then the output is 0 otherwise the output is 1.
04:32So, what is the z value?
04:34z value if it is less than or equal to 0, then you are going to get the value 0,
04:42if it is not
04:43if it is greater than 0, you get the output 1, ok.
04:46Now, what is the z value?
04:48z value is minus 0.7.
04:49So, definitely the output from this activation function what we got is 0.
04:55So, that means for this input the output what model has predicted is 0.
05:01So, the predicted one let us denote it as y hat and what is the result?
05:07The result is 0.
05:08Now, once we get this as per the perceptron learning algorithm, what is the you have initialized
05:16weights all this you have done, you have computed the input weight, you have computed the activation
05:22function, then you have to calculate the error.
05:26What is the formula to calculate the error?
05:29The formula to calculate the error is a target minus computed.
05:32What is the target?
05:33A target is 1 and what is computed?
05:35The computed value is 0.
05:37So, what is the error that we have got?
05:39The error that we have got here is 1, the error, one second, yeah, so the error what we have
05:53got is 1, ok.
05:57So, once you calculate the error, what is the next step?
06:01You have calculated the error.
06:03Now, we have to go back and then update the weights.
06:06So, what is the formula to update the weight?
06:09So, I am showing here W new is equal to W old plus change in the weight.
06:17So, W this is given as the learning rate and the target minus.
06:22So, we will call it as an error and we have to update the weight.
06:27Now, which weight we are updating?
06:29You have to update both the weights.
06:31You have to update W1 and W2 both because W1 and W2 and bias, we should update all 3.
06:37So, W1 is something associated with x1.
06:40So, substitute the values.
06:41What is the learning rate?
06:43Learning rate is given as 0.1.
06:45What is the error that we have got?
06:47The error we got is 1 and what is the x1 value?
06:49x1 value is 1.
06:51What is the change in the what is this value?
06:55We are going to get 0.1 delta W. With this go back.
Comments