In this session, people understand about gradient descent.
If you really see every machine learning or deep learning algorithm.
Is an optimization exercise.
That is.
The algorithm tries to reduce the difference between predicted minus actual, which is nothing but a
loss like last corresponds to the difference between predicted minus actual.
In one night, if I take the average of.
The loss of multiple operations, I have what is known as a cost function.
So the algorithm tries to minimize this cost because I want my algorithm to be.
Having a result that is as close to the actual as possible, I want my forecast accuracy to be higher,
which means the cost function should be minimal, the loss should be minimized.
That means the difference between predicted and actual should be as low as possible.
That is the optimization exercise.
So how do you do this optimization exercise?
Let's take an example.
The insurance company is trying to predict whether an insurance policy should be issued to an individual
or not, for that, six factors are considered.
How will the insurance company determine?
Which one should get an insurance or not or how old are going to go about its job?
It goes about his job by identifying the relative importance or DVDs of the different factors once the
relative importance of AIDS are known.
It is easier to make the prediction right because.
You want to know which factors is more important, right?
It is nothing but the Vassil W1, W2, W3, so on and so forth.
If I multiply the two, I have an output that will correspond to the prediction value.
Right.
If I multiply the two, I will have a value that would correspond to the output, which is nothing but
the predicted value.
What I do is I multiply the the factors and DVDs.
And then I saw.
Right, I will then compare against the actual also the actual is taken from the historical data once
they make a comparison, I know the error or the loss, right.
And that feedback is fed into the algorithm.
So the algorithm will try a new set of tricks like this.
Multiple iterations will happen and the iteration where the Lozar error is minimal.
Is taken as the final set of rapes.
But are you getting it?
So this is how the world of algorithms operate, the algorithm wants to find the reality with.
It takes feedback after assigning random set of weights by comparing between actual authors predict.
This is what happens in an optimization exercise.
So what is this gradient descent then, let's say?
You are at this point in this mountain and you have to calm down.
Let's also assume that you are like a computer robot, because if you are an individual, you obviously
know that you have to come down from this point.
You have to obviously come down because you are a computer, right?
You don't know whether to come down like this or you have to go up and then come down.
So the gradient descent algorithm helps us to make those decisions.
OK, because what is important is whether you should come down or go up and then come down and how big
a step you need to pick.
Right.
Are you getting it so for this gradient descent algorithm uses the concept of derivatives, because
what is a derivative of a derivative is nothing but change in way divided by change in X?
It is nothing but slope, and this is nothing but the derivative that we use in calculus.
Right, the distance reduces when this gradient descent is negative, so we actually compute the negative
of the gradient, which is nothing but the opposite of gradient value, the negative of way by the X
is what we consider.
Let us go back to the mundane example, right?
So we are here, we need to come down or go up, right.
This is similar to the Cole right here in water, the coal.
And let's say you are here, you don't know whether to take small steps are bigger steps.
If you are closer to the goal, you don't have to take bigger steps.
Right.
How will you decide that?
Or rather, how will the computer know the computer uses the concept of the website?
Because when you're closer to your goal, the slope will be much steeper, right?
Are you getting it when you are closer to Goldust, slope will be much steeper and hence you know that
you need to take only small steps.
When you are away from the goal, you need to take larger steps.
So that's how the gradient descent algorithm helps to make the decision right.
The individual or the computer robot right on the computer program will use the concept of gradient
descent so that it knows whether it needs to go up or go down and whether it needs to take bigger steps
or small steps.
And this bigger step and smaller steps will correspond to the different rates that we are talking about.
Are you able to appreciate the correlational?
Right.
So this process of giving feedback, like we assign different weights, compute the sum and compute
the difference between actual versus predicted, and we passed this feedback so that another round of
iteration can be done.
So this entire process is known as back propagation.
The the activities that comprise these steps are assigning weights, computing the sum and computing
the loss and providing feedback.
This is known as hidden layer because this is hidden from the input, because we see the input and we
see the output.
Right.
We don't get to see what is going on inside.
And hence it is known as hidden layer.
So this this is what happens in a deep learning neural network also.
Right.
So every machine learning or deep learning algorithm involves an optimization exercise where you minimize
the loss, which is nothing but the difference between actual losses predicting.
So if you are wondering whether you ought to do all these steps, whether you have to go through multiple
iterations, whether you have the right programs, do not worry that pre-built libraries available and
you can make use of them.
Right.
But you need to understand the concept.
Only then, you know, you can appreciate the output.
Only then you can value add in the entire algorithm development process.
Claire.