# Advance Machine Learning

- **Course:** 6103 - Advanced ML
- **Recorded:** 2026-09-29 18:30
- **Transcript:** 694 segments, 8260 words
- **Made by:** deepdml/faster-whisper-large-v3-turbo-ct2

---
So good evening, everybody. Am I audible to all? Good evening. Okay. So we are starting our class. Thank you. Okay. So in the last class, we have started activation function. Activation function. Good evening. Activation functions. And we have covered a threshold activation function. They are variant. Okay. non-linear activation function we have seen, their variant like sigmoid activation function and tanh activation function we have covered in the last class. Today we are going to start a very important activation function that is a ReLU, very famous particularly in advanced architecture of deep learning like CNN, heavily used in CNN. So the ReLU stands for Rectified Linear Unit and as we know and I'm also going to cover what is back propagation in detail today just procedural point of view without discussing the gradient descent what is back propagation and what is forward propagation also part of

today's discussion so it is unlike uh threshold activation function uh that are not suitable for backpropagation and gradient descent concept. But ReLU activation functions support backpropagation and gradient descent concept. Second and third point is the most important part of ReLU activation function where people must know it and people ask a lot of questions. So, what is the benefit of ReLU? What is ReLU? What is the formula? We will look before that. What is the benefit of the ReLU activation function? It does not activate all the neurons the same time. The neurons will be deactivated if the output of the linear transformation is less than 0. Okay, this is very important, right? what it called, it says, suppose your network having many neurons or you can view in typical architecture that we are familiar. We have a multi-layer, many hidden layers and output layers. Okay, what ReLU says that it is a fully connected neural network. Again, consider every neuron of

previous layer is connected, all the neuron on the next layer. So what ReLU does? ReLU says all the neurons need not to be activated at a time. Some of the neurons, suppose this is the sum of the neurons. Red color means not activated, not activated. Not activated means what? Not going to give any output. Agree? So how these things we are going to achieve and what is the benefit of that? I will discuss. So this is the simplest activation function but very powerful. You can see the formula of ReLU activation function is that it will return 0 or max, x of max. So, what is the meaning of that? If x is a positive number, it will return as it is. So, this is the activation function. This is a net input. Net input is suppose x. x is a positive number, then output will be as it is. If x is a negative number, output is 0. This is the simplest activation function. So, you see here with the plot diagram, it looks like an identity activation function

that is a differentiable. So if x is having the positive value, output will be the identical value as it is. But negative values output always be 0. And you can say what is the benefit of that. Benefit is that here. output of this neuron is minus 1, output of this neuron is 0.2 minus, output of this neuron is minus 2.5, output of this neuron is minus 0.1, output of 0.001. Assume that and you have applied the ReLU activation function. What it does? If these values net input is negative, what it does? What it will give the output for a negative value f. This is activation function is everywhere. Activation function is everywhere. So f you pass a negative value output 0 means not activated, not activity, not activity. So they are not participating at that moment during the learning process. Interpretation at that moment, not always at that moment, that moment these neurons, these neurons are not participating, are not

participating in learning because if they are zero means no update zero means there will be there will not be wait update not be wait update okay like it okay so it leads to a lot of advantages first the most important advantage or high side of this ReLU function is, it is more computationally efficient because in the real life we have millions and billions of neurons. If you see the architecture, heavy architecture, a lot of millions of weight and parameter you need to consider. Millions of weight. For example, if try to Google it, If I say the number of parameter in ResNet. ResNet is a model, pretend model, suppose. So how many parameters are there? Let me check. 11.7 million. Simple ResNet is a one model. having 11.7 millions of parameters. So this much of weight or updation in every epoch, multiple time in epoch we need to do it, it demands a lot of computational power. So what ReLU offer, if some of them

5%, 10% in different races are there, where they are not participating in the training process, It will help us to make model better learn first and computationally efficient. And it also leads to reach the global minimum as early as possible. So these are the benefits of the Rayleigh. There are limitations and a very favorite question in interview, what is a dying Rayleigh problem? it does not occur regularly, but is a phenomena, it is characteristics may occur sometime. So, now let me explain one of the problem with the ReLU that is a dying ReLU problem. So, what is the dying ReLU problem? Dying ReLU problem. So, as we see in this network, suppose these are the neurons and assume that if condition occur assume that condition occur in all iteration in all iteration during the training during training in all iteration they never get activated. It may happen or not? They always deactivate it. So this problem we call it dying

ReLU problem. Dying ReLU problem. Okay, so what is the meaning of keeping this set of neuron in your network? They will never participate in training process. So they are that kind of thing. Why you have kept those neuron in your architecture then. So, this time, sometime it occur, we call it dying-relu problem, okay. What is the solution of this problem? Solutions of this problem here, we have a one variant of ReLU. People ask a lot of question on that. What is a leaky ReLU function? So, what ReLU and original form, it does not allow anything to do to go ahead if threshold or net input is zero or negative. So we want a ReLU function that can allow somehow, not in that scale, but it may allow. So this is the leaky ReLU function. What it does? Earlier, if the negative value were there, we say no, zero, output is zero, deactivated. But here we are reducing the magnitude of 90% with the smaller value we are allowing to go

for the next phase. Okay? So in this way, we are anyhow able to solve the leaky Raylu problem. So that's why a dying Raylu problem through the leaky Raylu activation function. Okay? So this is the you just note it down the formula i don't have a sweet screen option here you just see this formula okay formula is very simple you should remember it what is here it is a relu okay this is what 0.1 x and x this is okay very simple so moving ahead you can search a lot here. Next activation function we'll cover during the CNN and function name is the sortmax activation function. It is not a right time to cover. So during the CNN discussion, I will cover the sortmax activation function. Okay. Yeah. So this is the topic ended about the activation function. We are going to pick the new topic. Very fundamental topic. the new topic we are starting is about forward propagation and the back propagation. Forward propagation and back propagation. Ultimate this is the concept high level concept not in

in detail high level concept of deep learning model training. So what is the topic? What are the basic steps to train the deep learning model? Deep learning model are iterative method. I think iterative method means we need to we need to repeat multiple times the training process and what happen every time? First, always perform forward propagation then back propagation this become a one bundle this is iteration one similarly for iteration two similarly for iteration three and number of time forward propagation back propagation forward propagation back propagation forward progression back propagation multiple times you have to do it so this is the high level concept of model training particular deep learning model training better to say deep learning model training okay so let me have a look on it it's simple but everybody must know the functioning of it. So look, suppose this is the one architecture of deep learning model

having only three layers. Everybody is familiar. What is input layer? What is middle layer? What is output layer? And how we can store the weights? Suppose this is the W is the matrix. It is written here, size of here d x k, d are the number of neurons in the input layer, k is the number of neurons in the hidden layer like that. The weights are stored in the form of matrix like that. So it was well covered in the previous classes. Is it clear or not? I have covered it. Am I correct? Okay, so there may be various kind of architecture like in the previous one the output layer having only single neuron. In this case, output layer having the multiple neuron. Why? Because this model can be used for the multi-class classification. Each neuron at the output layer may corresponding to the one class. Similarly, if you have a deeper neural network or deep learning neural network, a lot of hidden layers will be there. A lot of weight matrix will

be there to store the weights between the two layers and bias will be there always. It is by default. Left hand side are the return of how to calculate the output of the each hidden layer of each neurons. Suppose this case, H1, first general layer, outputs G means activation function of this layer, this is the weight matrix, this is the input. So if you are going to up multiply weight with the input, what is this? Become net input, you feed the net input to corresponding activation function, it will give you output. So h1 will be the vector containing output k number of neurons. Okay, so this terminology I hope clear to everybody. Yes, so what is forward propagation then? So like a first bullet point, if you refer the forward propagation is the process in the neural network particularly in training process where input data is passed through the network layer to generate the output. So it calculates the output of the network for a given input based

on the current value of the weight. So what happens? Suppose this is the network, you feed the input. This input will go to the layer by layer, layer by layer, layer by layer and it will produce the output y hat. Once this process is completed, we call it forward propagation. Why forward propagation? Because in the forward propagation, we just propagate from first layer to the last layer. We don't return back here. We don't return back. We go next layer to next layer. That's why we call it forward propagation. So what are the basic process happen in the forward propagation. I will explain in detail. Okay, suppose you have designed a network. Suppose this is the network. Agree? So this network having fully connected network, so it will have a weight matrix w1, then we'll have a weight matrix w2. Suppose activation function is here f1, activation function is here f dash, all those things. So first step will be what? You can easily say initialization of parameter or weight,

initialization of weight. We already discussed how to initialize the weight, random, small value, like we have seen the linear regression, small value. So wherever the weights are there, parameters are the whole model complete model we have to initialize it so first step we call the initialization got it so here it is clearly mentioned parameter is initialization so weight matrix bias vector what activation function you are looking to have optimizer everything learning rate. We will cover what is learning rate later. Everything you need to initialize randomly. You have to decide. Once it is initialized, you just start, give the input. Whatever the input you have, suppose x1, x2, x3, x1 may be your age, x2 may be a salary, x3 may be a weight, you just due to the net worth, due to the net worth. So what it does, every neuron, every neuron here, every neuron, every neuron, at each neuron, what it does,

we have to calculate the net input, we have discussed in very much detail. Once we have a net input we have to pass into the activation function. Once we have activation function, it will it will give you output. Output what? Output of each neuron. Output of each neuron. Agree? So that is the next step happen in the forward propagation. Once you have output of neuron, you need to pass those output to the next layer. we call it feeding forward that's why name is given feed forward output of each neuron goes to and become input to the next layer okay so yeah so let's have this network we have a input here in a superscript it zero means input layer one means hidden layer two means the next layer. So A1, A2, A3, 0, 0 means they are the input at the input layer. So what it does suppose, for example, all are the fully connected neural network. Three inputs at the input layer are connected to the first neuron of the hidden layer. Similarly, for the second neuron of the

hidden layer like that. They are associated with the weight. How the name is given? W11 means first neuron of the input layer connected with the first neuron of the next hidden layer. W11, then W12, then W13. So how it does? How it happens? So we have to multiply input with associated weight, input with associated weight, input with associated weight plus bias b1 and you need to solve it. It will give you net input. Net input will become as an input to the activation function. This formula is written clear. Okay, so since we have a complete matrix of input and weight, we don't need to do one by one. Just put it into the that way. You see complete weight between input layer and the hidden layer, this is the input. You start multiplying. So this w11, w12, w13 multiply with all three input. It is written in this color. You solve it, it will become the what? Net input of this first neuron. Similarly, if you go to the next multiplication, it will give you output of the next neuron.

Bias will be there always by default. Bias will be added as extra input always. Everywhere here, here, here bias will be there. We will discuss later what is the rule of bias. I already declared it is not the right time to discuss the bias. So what is this? This is once multiplication is over, you can give to the activation function, it will give you four outputs. A1, A2, A3, A4. What are the four outputs? These are the four neurons at the next hidden layer. These are the four outputs. So these four outputs will go to the next layer like here. And at the green color point, these four outputs will become the input at that point and corresponding weights will be there. So look here, A1 is a vector that contains the output of a sudden layer. They will go to the next layer. So next layer output A2, A2 is the output of this green color neuron. So how to calculate the output A2? Output of previous layer that is A1, multiply with corresponding weight W2.

W2 will be what here? In this place there will be W2. Yes. Correct. Dimension of the vector in every location depend on the number of neurons in that layer or to the next layer. Correct. Okay. ultimate, it will give you final output. So, final output will be given by output layer. In this case, we have a single neuron. Agree? So, what I have, I have completely discussed the forward propagation. In the forward propagation, ultimate, what happened? forward propagation, we give input to the network, it go layer by layer, layer by layer and give you output. Output means predicted output. Suppose it is a classification problem or supervised learning, predicted output. Is it clear? So that is called forward propagation. Then it is a classification problem that's why we have a target output also. Target output or you can say the correct output or ground truth. So you can see the error. You can check the error. Error means

how to calibrate the error. Whether you can say the target minus predicted. So what was the target? real value what my model is predicting assume that it is a regression problem so if you do it you will say it is a error or it is a loss yes activation activation is not a layer activation is a function it will be the part of every neuron okay Akash don't confuse with activation is not a layer, it is a function, can always be with every neuron. Now clear? Yeah, if multiple hidden layer, multiple neurons will be there, every neuron have an activation function, everywhere, all the neurons. Okay, so error is clear to everybody, the way we have calculated in the linear regression in that context, in that context. All the layers have a same activation function but different layer will have a different activation function, that's not possible. But if one layer you have decided, the same activation function you have to use in all the neuron of that layer. But different layer

may have a different activation function, that is correct. Okay Sachin, great. So error is clear to everybody. Okay, so this is the forward propagation. Then we have to calculate the error. I think up to this moment there should not be any any question in conceptual point of view. So now we have to start the back propagation. So the structure point of view you need to understand. So here input is given to the model. Then forward propagation, we have a final output. We need to calculate the error. Once you have an error, you start with the back propagation. You start the back propagation. What it is, we'll discuss. Don't worry. So look, so idea is what? Okay, so there is another term like a forward pass. Forward pass means forward propagation. Similarly back pass. Sometimes people use forward pass and back pass okay so what is written here let me explain yeah so at least it it it at least it will it will come with your experience if you have a lot of model training

experience you have handled a lot of problems automatically uh you will have an idea which activation function may work in which type of problem. There is no any hard and fast rule by which you can decide it. It comes with the experience and hit and try. At least even you have a lot of experience couple of activation function you have to hit and try which works fine for you. So answer is a hit and try and it comes with experience. There is no hard and faster. Once you fix the architecture, during training you cannot change it. After training you can change it, then again training. So question is that once the training is started, you cannot change the number of neurons. You cannot increase or decrease it. That's clear. But suppose for example, this is the model you have taken. For example, I'm answering the Saroj question, sorry, Gyan Chand question. Suppose this is the architecture and you have trained it and you

have seen the performance is not good at all. You have tried everything. Performance is not good. Okay, so now you can change it. You can increase the more layer and number of neuron in each layer and again train and test it. So in that way, you can change or increase the structure or architecture of the neural network. But once training is started, in between you cannot change. Yes, yes, Sachin, you can do whatever the way, like such kind of architecture or model you are constructing, you are designing the number of neurons, number of layers, activation functions likely you can define your own activation function depend on the requirement. It's possible. Okay, so we know we have an error. We have an error. Now you tell me how to reduce the error during training. What is the objective of training? You tell me objective of training is to reduce it, Minimize it. Okay, how to do it? Any idea? Any idea? Okay, idea is that we need to update the

weight. We need to a simple line if you want to once update the weight in the right direction, better to say right direction, such that next time in next iteration, we reduce the error. That is the final objective in any kind of training, any model like it is machine learning weather or deep learning, that is the purpose of training. But the question is, first, when we update the weight, first question, second question how to, how to update, there are two questions, agree, how to update the weight, I am not answering right now, here answer is the gradient descent, it is a part of course I will cover later. Today I am not covering but when update the weight that is the important here. So like I was discussing input is given it will go to the forward propagation then we have an error then we need to go for the back propagation. Here we update the weight. Here we update the weight that is the location. So, question is when we update the weight? During the back to location. Once

this process, one iteration is over, next input will be given. Next input with updated network. Because what was the earlier network, it is not identical. Why? Because during the back propagation, you have updated the weights. That's why we have a different network. Architecture is different, number of layers are different, neurons are different, but weights are not same. So now we have updated network. You just start the forward pass. Similarly, again, backpass, you have backpropagation, okay? Then we have a next input, got it? So, this will continue, this will continue, this will continue. Very high level understanding of forward propagation, the backpropagation, I have covered it. So, this is the backpropagation, we start in the reverse direction, that is very important to understand. So what is the meaning of reverse direction? Meaning of reverse direction is that suppose this is architecture or network. So what is the last layer? We're starting with this output layer.

We start by propagation from here totally in the reverse direction. So reverse direction means here the weights between here last hidden layer and the output layer there will be some weights those weights updated first then it will propagate backward next layer these are the weights in the next layer they will get updated then next to next then reach at the last layer. That is actually the first layer. So, it totally goes in sequentially. There is no random. Understand that. There is no random. It is a directional graph you can consider. Directions are there. So, during the forward propagation, those directions you need to follow. Just opposite direction during the back propagation all neurons all all every all the weights so sort of answer is that there will not be anything that will be left out all then it will go to all the neurons all the neurons all the weights suppose 11 million weights are there

11 million weights will be updated got it yes weight of bias will be updated bias will be treated exactly as a normal input? Answer is yes. Bias also have a weight. It will get updated. Correct. Okay, Lashmi, you are 100% correct. Back propagation is nothing but simply about the weight update. But you should know, you should agree, it is the most important part. Weight update means learning. Whenever you practice a lot like driving a car, driving a bike. You are updating your neurons in biological neurons, practicing it. So it's only about the weight updation in the back propagation, but that is the core of learning. Any question here? Yes, after the forward propagation and then only the back propagation start. Yeah, weight updation happens sequentially through the gradient descent or any other optimization. So dynamically, I don't understand what is the meaning of dynamically. Dynamically means there should be a scientific formula

that update the weight based on some rule. It is not random. okay very good question Saurabh Kumar Pandey sir in the back propagation is mandatory okay suppose there is no back propagation means there is no learning there is no model training so what you will do that kind of model that without trained model Saurabh got it so propagation is back propagation mandatory if you are looking a learning from the data yes that's why training of deep learning model is super duper extensive. Millions of ways we need to update in every iteration, not only single, every iteration. Yes, Saurabh. Once, okay, Saurabh has asked very good question. Ultimate, you should ask when you stop it. Better question is that when you stop it. Okay, Saurabh? That is a right question. Everybody should ask this is the training process when we start it, when we stop it. Actually, we have already covered the linear regression. There are two options. Option one, error becomes

zero. That is a rare. That never happens in the complex application. If you have a error zero means your model has been learned everything from your data. Got it? So, it normally very rarely happen. You should be here. Yeah. So, if you stop, stop improving, improving performance means if you stop reducing error. It may happen or not. You keep on going on, going on, going on in every iteration. In all the iteration, error is same. It is not changing. So there is no point for the training. So I have answered that question. Going to next, this is a summary only. I have covered it. So forward propagation, back propagation ended. just summary forward pass error calculation back pass update so this is the one iteration similar millions of iterations are required forward pass error calculation back pass during the back pass we update the wait so same thing is written forward pass everything so we don't need to yeah so what happened in the forward pass it is here i i

I will upload that notes into the Moodle. You can check it. Okay. So it is all about the forward propagation by propagation. I will update that notes. So if you have any question, otherwise we can start the first model that is in your slavers perceptron. This is the important. It is in your slavers perceptron. Okay. So also we have in covers epoch, batch, what is batch, what is iteration. I will cover it. It's not the right time, but I will cover it. What is epoch, batch size, iteration, everything will be the part of our discussion. Learning rate, I also be here. During the gradient descend I will discuss its learning rate, what it is, what is the role, impact, part of course I will cover. It is not written in your course but by default everybody should cover it. Assignment to syllabus means whatever the course I have covered it, it will be the part of assignment. Okay, got it? In every time you do, you don't need to ask this question like syllabus of assignment

2, 3, 4, 5, 4, quiz, whatever I have covered from beginning to end, beginning to end, ideally it will be the part of any examines. What did Narayan, there is no fixed levels at all for assignment 1, for assignment 2, for assignment 3, nothing like that. Whatever covered from class first to tell class with the syllabus of any exam. Okay, so look, so this is the concept just we have seen. Now moving to the next. There's one background. So you know, I think sometime I might have covered the first model, normally we consider first neural network model, the neural network model, we consider MCP model. Okay, MCP means let me recall it McCulloch and Pitts. So this McCulloch is one person, this Pitts is another person. They have introduced the first neural network model, first in the life. Okay, it was sometime it is written 1941, sometime somewhere it is written 1940. Yeah, it is very important and sometimes people ask this question interview but it is not

in our course. I'm not going to cover it. Okay, second was I think just since you are from this field you should aware about HABs rule or HABs learning model. Sometimes we call HABs learning model. Very famous. I think it was introduced in 1949. Okay. So, you should cover it. These are not in our syllabus. So, I am not going to cover it. Why it is given in the course perceptron? Why it is given in the perceptron? Because there is a reason. We have just discussed two things I think. Yeah, forward propagation and back propagation. Okay, this is the integral or important part of any model training. They were not in NCP neuron, NCP model. It was not there in Habs model or Habs learning. Okay, so there were no concept of back propagation. That's why they were very much basic model, MCP or HABs learning model, very basic model. And they were not adopted back propagation, forward propagation in true sense.

There were no, there were no any, any, any, any, any solid, solid mechanism for weight update. Okay. So since they are too much simple, they are too much basic, so it is not in your slivers. Perceptron is a model that started using forward propagation, back propagation and weight update in the real sense. That's why it's so famous. So let's have a look here. Frank Rosenblatt is one of the well-known persons in deep learning or neural network. The perceptron algorithm that we are going to discuss here, very simple but powerful, was introduced by the Frank Rosenblatt. Further, this perceptron model was revised or enhanced by the two person Minsky and the Papert. Very famous in that field. Everybody must know it. This perceptron model algorithm is inspired or you can say based on the MCP model and the Hepp's learning tool. So whatever the advanced current day, current day's architecture of neural network we are experiencing, all are based on this. They are based on the or are inspired by

the perceptron. Perceptron is based on the MCP or Hebstro. Okay, so this is the fundamental or just general knowledge about the field you must know. So moving ahead, yeah, so we know about the forward propagation. I'm not going to repeat it here. Everything is just, it was covered. Now in perceptron, we use activation function in the perceptron. I'm discussing about the perceptron algorithm. So in the perceptron algorithm, you have two choices of activation function in the perceptron. You have two choices. First is in the perceptron we offer unit step or threshold based activation function. As we know it is a binary activation function where if net input is positive answer will be 1 otherwise answer will be 0. We have discussed in the last class. So unit step activation function is a part of, take one second, one second. Okay, sorry for disturbance. Yeah, so yeah, so one option for activation function

under the perceptron is a unit step activation function. Another option is their sign activation function sign activation function uh i am audible to all please class is not ended i am discussing here am i am i audible to all please write on the chat box great okay okay so yeah another option for the activation function in perceptron is sign activation function it is nothing but it is a a binary activation function but output is not zero one output is bipolar minus one and plus one okay that is the difference so yeah so a lot of uh uh formula or you can say the way of presenting the weight update it is written ultimate how to update the weight simple formula you should understand W new weight will be what? W old plus delta W. That is a simple formula. The new weight will be what? Old weight plus something. So, delta W will be maybe a positive number. Delta W may be a zero. Delta W may be a negative number. It will come during the training automatically.

So it says that w nu may be greater than w old. If delta w is positive, w nu will be equal to w old. If delta w is 0, delta w nu may be less than w old. old. So we are changing the weight. Changing means what? Here I have proved it. Either it is possible to increase the weight, no modification or weight may be decreased. So here more better formula if I try to write w new will be w old plus learning rate and delta w. Okay this learning rate somebody asked the question is is something normally we initialize with small number. What is the impact? We'll discuss later. If I expand it, what is w old? It will be alpha. I am just going to explain what is delta w. Delta w means target minus predicted minus predicted multiply with xi. So, this is the formula for weight update we used in perceptron. This is the past part of perceptron algorithm. Agree? So, w old will be w new will be w plus alpha. What is the target? What is the predicted? Multiply x i. Or simple way if you want

to write delta w will be what? Error. Multiply with alpha. Multiply with input. So this is delta w in perceptron. It is written here. All the three four lines are the same. Weight t plus one means new weight will be older weight, weight of time t, learning rate, expected output means target output, what is a predicted output multiply with the input. Similarly, you can represent this formula in various way. Different different books and literature have adopted different symbols and other way to express the same meaning. Okay, the simplest one is this, delta w will be learning rate target minus predictive multiply with input. Now, come here. So, understand here this is alpha that is a constant. This is a constant number. We should not discuss it. input is again a constant it is here what are the possible value here t minus o target minus o can you tell me what are the range of or what kind of output you can get it with this calculation

only anybody any idea think more more answers i am looking i am repeating if you solve it any kind of input in the perceptron what are the possible output here with this calculation. Yes, exactly it will give you either 1, 0 or minus 1, nothing else. Other values are not possible at all. Not 0 to 1. Only either plus 1, 0 or minus 1. Three options are there. Why? Suppose which activation function you have used in this perceptron, unit step activation function. Okay. In unit step activation function, what it is, it will give you output 1 if x is suppose greater than 0, otherwise output 0. so here output will be what either 0 and 1 nothing else nothing else got it is it clear so what is the meaning of that suppose target suppose target is 1 and your model is predicted your your output is 1 so error is 0 agree suppose target is 1 your model is predicted is 0. So error is 1. Agree? Suppose target is 0, your model is predicted 1. So will be

minus 1. Suppose target is 0, your model is predicted 0. Am I correct? Only three possible values. Plus 1, minus 1 and 0. Got it? Yes, yes, yes. Yes, Atis. Okay. So now come here. Intentionally, I have taken two perceptron version. So left hand side is an algorithm of perceptron where unit step activation function has been adopted. Right hand side algorithm where bipolar or sign activation function. Output and working, internal working in both the cases are exactly same. Since we have changed the activation function, so some different condition we have to apply here. That's why. In this here, I am going to explain perceptron with unit step activation function. Okay. This. Got it? So I am going to explain. So the data set is given to you. Suppose it is a classification data set. So there will be have two labels only. Class 1 and class 0 or positive class, negative class, class A or B. Whatever way you want you can think about. It is a cat and dog like that. So if observations of positive class

I am presenting with the p. Observations with the label 0, I am presenting with the n. Okay, so start forward propagation or training. Initialize all the weights randomly. Then you need to repeat this process multiple times. Training is iterative process. How to do it? Pick any value from p union n. p union n means whole dataset because data set having only two levels. So, p union means complete data set. So, whatever the complete data set is given to you, you pick one observation, okay, then check. If this input is a part of positive class, but net input is negative, w dot x means net input you give this x input to your network and final neuron output we need to calculate based on the net input if net input is negative we need to increase the weight w plus x okay if x is from the negative class but net input is a positive then we need to decrease the weight. Okay, so let me discuss one by one how it is coming.

Okay, so there were only two conditions. Each one condition I will discuss one by one. Okay, so understand here if x is part of p, what is the target class then? What is the true class? you tell me what is the correct label correct class for input x if it is a part of p you tell me part of p 1 correct correct so target is 1 okay now we have given it to the network and network final net input is w dot x less than 0 same condition it is written w dot x less than 0. Agree? So this is the net input. Now recall this unit step activation function where 1 if net input is greater than equal to 0 whatever the condition is there don't worry about equal 2 is written here. Okay, 0 if net input is less than j. So in this case, what will be the predicted output if it is a negative number? So if w dot x activation function, it is a unit step activation function. So, what will be the predicted value you tell me? Predict value 0. Great, great.

Suppose learning rate is equal to 1. Now, come to the weight update formula of perceptron. w mu is equal to w old plus alpha is equal to 1 t minus o x. Is it clear? Here t is 1 predicted value is 0. So it is what? W old plus x. Cut it. It is written here. W plus x. Learning rate is 1. Other case. Case 2. If x is part of negative class means target value is 0. But w dot x greater than equal to 0. W dot x greater than equal to 0. It lead to the predicted value will be 1. Agree? Put into the formula w new is equal to w old plus t minus o x t is equal to 0. output predicted output is equal to minus 1 to solve it so w nu will be what? w minus x it is here. Got it? So this is the way algorithm work. Now I have a some okay some additional optional reading it I will not ask any question from here some some some some additional stuff. Additional stuff is say, okay, formula wise we are okay, but why we sometimes increase

the weight, why we sometimes decrease the weight. Leave it about the formula, why it is happening. That intuition is very interesting. So I will discuss that part in very brief, very brief. Okay. So question is here. I have written why weights are increased in this case, why weights are decreased in this case, mathematically leave it. Why it is not vice versa? Why it is not vice versa? Okay. So just have an intuition. Suppose this is the decision boundary. I think everybody know about the decision boundary. All the observations that are below this boundary we will predict as a negative class or observations that are above this decision boundary will be predicted as a positive class. So in the logistic regression, I have covered the decision boundary. Decision boundary is nothing but simply a line where you try to classify the things. This is the case one, this is the case two. Case one was what? the observation was really in plus, means positive class, but it was below from the boundary line

or decision boundary. That's why my model predicted output as a negative class. This is the case too where the data item is from the negative class, but since it is above the line decision boundary, my model is misclassified as a positive class. So these two cases are clear. Is it clear to everybody? Geometrically? So how to correct it? You tell me. What is the way of correcting it? During the training, we will update the weight, that's okay. That's okay. Adjust the boundary, correct answer. So if I am able to adjust or move the boundary in that way, So what happened now you can see because you cannot change the input. Input is fixed. It comes from the data set. So if you move the boundary and if you reach here, you end good position. Now this earlier it was misclassified. Now this input is above the decision boundary. It will be correctly classified now. Okay. Similarly for the case 2. So if anyhow you are able to move the boundary,

you will improve the performance of the model. But question is that how to move the boundary? So now I have given here all the derivation. I am not going to do it here. I am not going to cover it. You can just go to this document. Right. So, what is A dot B means dot product of two vector. W is one vector. Input is another vector. Agree? So, W dot X means this. This W dot X I am talking about. This W dot X. This W dot X. Net input W dot X. Multiplication of two vector. So, you know multiplication of two vector means a dot b is equal to a b cos theta. So come to just focus over here through this derivation it is proved the weight vector or weight is inversely proportional to the theta. So what it is saying that suppose this is the w vector and this is the input x. It is constant. You cannot change it. It comes from the data set. It is a theta. So theta is inversely proportional to the w. So what is the meaning of that?

that if you increase the w, weight, theta decrease. If you decrease the weight, theta will increase. Remember it. Okay. That is the crux of discussion. So, come to geometrically here. So, suppose this is w and this is x. Assume that. So, if any of the data point like x1, x2 x3 x4 are above this line you can see the angle between any of the data point with the w that are above the line will be less than 90 degree agree so that's why i have written theta 1 theta 2 theta 3 any any data points that are above the line for that data point that is represent as a vector to the w the angle would be less than 90 degree got it so w dot x anytime you are going to calculate it will be going to have a positive number got it just opposite data points that are below the line that are below the line angle with the w will be greater than 19 so cos theta where theta is greater than 90 will give the negative number okay so w dot x

will be the negative this concept is clear great so now come to here yeah so look this is the data point case 1 it was below the line so angle between the consider this is w angle between this w and this data point is greater than 90 agree so if i try to see here this case this is the data point it was there this was the data point that was misclassified that was misclassified and this is w this theta is greater than 90 degree got it I want to I want to reduce I want to reduce this theta agree to make it less than 90 and if you want to reduce the theta what you have to do you need to increase the weight logically it is clear now normally people don't discuss that much of level of working of the algorithm it is not required but if you want to enjoy you want to learn as deep as possible. It is very interesting. Otherwise, why should I discuss that part? Okay, so that's why you see in this case we are increasing the weight. That's why

because of this we are increasing the yeah this was the case. The theta was greater than 90. That's why we need to increase the weight. W nu will be something bigger than that one. So that we can decrease the theta. So you can visualize in that way. Okay, so that is about the perceptron. It is ended. Next class, we'll cover about the next algorithm. Next class, my plan is one more algorithm is like a withdraw half learning rule. hardly 10 minutes it will take then from the next class i will start nlp natural language processing okay hardly two lecture will be there one or two lecture will be there then cnn okay advanced deep learning model that is my plan got it so if you have any question otherwise we can end the class assignment two again same question whatever course has been covered part of assignment from class one to this class yes or my objective is only to to to make you comfortable uh uh whenever

you go for referring any other sources you should so you should get less time to cover you should get less time to understand if you are attending this class that is my objective only otherwise all the steps are available in internal i don't have any other any particular book that i follow i never follow any book that's problem i cannot suggest it but in your syllabus some books are written you can refer it i i i always say go and and just read stuff from the internet different different video channel you can check topic wise not not completely topic wise suppose forward propagation back propagation suppose perceptron you just search what is perceptron how it works in different different platform that is a good idea to learn single book if you follow you will have a limited learning all are good book all are good book good fellow have written very good book the pdf is also available if you google it the good for a good fellow pdf you will get it

so okay so we are going to end the class we will meet uh uh in the next week again thank you

