Hello.
So in all of a previous version, we have learned some basics of nutrition.
Yeah.
What exactly is the allegation and what is it?
You know, what is up mathematically utian of this linear regression we have learned?
Yeah.
This Y equals to see it is nothing, but it is just a mathematical representation of a regression.
But we have this use case as well in which I have to predict what can with a bit of apples and if if
the person has that much higher.
So basically we are going to learn the basics of probability behind some slope concept behind this regression
as well.
So we have learned this is exactly the thing.
But this my slope.
And we have also learned, yeah, that's a basically a slope how you can complete within two points
and what the slope at a particular point then we have also learned.
Yeah.
What if what if basically according to you is accurate one data points we can have multiple regression.
So which line is exactly my best line that we have learned.
Yeah.
Whosoever has at least masc whosever line has at least MSE then that line gets selected as best foodline
not a caution or what he had arises.
What if what if we have let's say, let's say we have a thousand of lines for it makes no sense at all
to calculate MFC to what each and every line.
It makes no sense at all because it will take a huge amount of processing as well.
So so far, what we can do so in such case, what we are going to do, we are going to use some once
approaches, basically, which is exactly which is exactly looks like something this which is exactly
my gradient descent approach.
That's that's what we have learned some basics behind this in a previous session.
So this is exactly my gradient descent approach so that if some of you of now are not comfortable with
this three dimensional plot.
So let me explain all of these things in two dimensions so that all you can digest is all these fancy
terminologies in very easiest to let me explain all these things in a good format.
Supples, let me consider some consider some data points and some advice as well for here.
I'm going to select it.
I have some data point with respect to some usages.
I have some data points thought say this is my data point.
Alexa, this is my X-axis and this is my wife there, too.
These are my data point that I decided or here if I were to accept the number two.
One, two, three, four.
Similarly, the one something to something to something useful.
So if I have to draw a best fit line that can do predictions in future.
So if I have to our best foot line over here, it is nothing.
But it is just like something like something like almost something like that.
So basically, if the question will be if the question will be nothing but White goes to MS in the format
of likely to emit, because you will also in this white goes to policy in this vital to MEAC.
What we have learned, if this intersect, is viewable only if it is going to pass through this orison
and we will see this line as possible.
Or isn't it with the sea value, the sea value is basically zero.
So this line is nothing but a format of this viscose to access.
So anyhow, you have to compute this every once you will compute your best and your feasible and your
statement is almost done.
That's what we are.
That's what we all are trying to achieve.
It looks like these are all my apartment.
These are all my data points.
And let's say I have come up with let's let's say let's say I have come up with some solution of let's
say I'm equal to one that's in very first kiss.
The very first case I have with my Amazon is assuming I do it.
So if if I have to do prediction in such a case, in such cases, what I can do is say if X equals to
one.
So what did your prediction, what to do, prediction?
It is nothing, but you have to just put X equal to one over here.
So it is nothing but a Y, one of equal to one.
Similarly, four X equals do it is two.
Similarly for three it is three.
Similarly for four it is four.
So in such case, in such case, your best fit line will be exactly like this and this equation would
be nothing but Y equal to X.
Because here is one here to stop Islam.
So if I have the computer, if I have to compute my, my, my, my, my, my meniscal as such case,
it is nothing but a zero.
How, how?
Because it formulates something.
This one, in my estimation of one, because it'll be different if you have Y minus actually the by
minus what exactly.
The prediction you will see your prediction and actually the point I almost equate it with it means
disvalue zero and it's multiplication will get that fight in some scenarios.
My mzee, my masc will be zero.
So let me let me open a new let me see.
Just some diagrams.
So it's a the very first line that we selected.
Yeah.
So let's say this is my land.
This is my husband and this is my second.
That's it here.
Here on this on this X-axis, I have basically my slope.
And on this Y-axis, basically I have something known as my masc and green is quite atah.
So you will see when your arm is born, say, when you're elected.
This is my one exoduses.
My arm is four.
So then your Amazon, your your meniscal add a zero.
So it means, it means, it means this is that one.
It means this is, this is this is that one.
This is that point could change the color of the pen so that you all are very much comfortable with
this.
So this is this with respect to my Amoco's tour.
Similarly, if I have to compute some other recognizability here, I have completed for equals to X.
So what what if what if what if what if my and valued X.
What if my values half it's.
What if my values have so such.
Is this why it goes to the thing.
Where does half of X..
So if I have to compute over here, if I have to compute in such case.
So when my X is one, X is one my wife goes to house when my X is two.
My wife is one where my ex's.
My wife is three by two.
This is my wife and if my ex is for my wife, I will be to see if I have to draw a line with respect
to all these wire, with respect to all these vile and all these ex.
Did I have to draw obsessed with life?
I guess if I draw a line with respect to all these data points, all this data.
So if I have to draw so let me let me draw one here.
If I have to draw, it will it will go something like it will go something like this, something like
this.
Something something like this across something like this to here you will observe this, this, this,
this cross, this cross.
Not exactly.
My actual data points.
This cross are exactly my actual data points.
And this is your prediction.
This is your best line.
This is exactly the best line, so in such case, if you have to compute, if you have to compute,
if you have to compute your MSE, you're me, Escada, so it will nothing but my one by end.
So here I have four data points and summation of all you add up with respect to each and every day for
your prediction.
You are ready for that because you are here.
What is the actual data like one and what are your predictions have?
Similarly here, what is your actually point, what you will see two to?
It is, whereas your your what is your what is the prediction, you see one, what is it?
What is it actually the actually the three.
What is your prediction.
My prediction he.
Why do.
What is what is actually actually tasteful, because here my bias for it, but what am I to say it isn't
this is not Arab.
So if I have to complete all this thing, it is nothing but one by four and it is nothing but just one
by four.
It will be just one.
It will be just it will just undertows 294.
And similarly with him, I have something for and I have to do some basic calculation.
So it is nothing, but it is just in to become divided, which is which is almost equal to three point
seventy five.
And if I have to let's see if I have to block it, if I have to plot over here.
So I have to plot this.
I have the plot when my M when my M is zero point five, when my aim is zero point five four in such
case, in such case likes it.
Let's say this is my this is my little.
This is my this is my MASC, which is exactly three point seven five, I said this is mine, that similarly,
if you will compete for each and every M, if you will compete for each and every time, you will get
some kind of some kind of go like this from the overhead, you will get some kind of code like this,
some kind of go anywhere.
If you have to match this dot, if you have to match this dot, it will look it will look something
like this.
It will look something.
You have to just match it to just match all these datapoints.
Let me let me match it and it will goes to yeah, so this is this this this this diagram is exactly
it is exactly what gradient descent it is exactly your gradient descent that what we have learned of
the recession in terms of three dimensional, it will look something like this because here you have
Intersect as well.
But here I had just just just to mention just so that you can digest all these concepts.
So now what we have to do anyhow, anyhow, we have to reach at this particular point because because
at this particular point, this is exactly my global M.O. I can say this is my global M.O. It means
I have to reach if you if you have to remember some basics of calculus that you have learned in your
Templestowe, if you have remember the basics of calculus.
So this is exactly my global M.O. They're my sloper zero.
Where my slope is zero, all you can see, where my MFC, where my MLSE is zero.
So anyhow, you have to reach you have to is at this particular point and at this particular point,
you have some value of em and whatever, and you will get you have to simply put, you have to simply
put in this in this.
Dictate that you promised that that's what you have to do.
Now the question arises how you can reach at this point how, how, how you can teach at this particular
point.
Suppose initially, suppose initially I considered that, let's say some based on my slope.
Let's say let's say I am this let's say initially I am over here.
Let's say initially I am over here.
I am over here initially at this point at one assuming it is by far, it means at this particular point
what I can say, whatever M.S. you have at this particular point, you have to move in such a way.
You have to move downwards in such a way.
You have to move downward.
You have to move down or you have to move downwards in such a way, in such a way that you will go at
this point.
Because at this at the Struble minimum, you have you zero at almost zero atah that that's what your
goal is for.
In order to in order to move down or in order to move downwards, you have a quorum.
You have to ram what you can see.
You have a concept known as convergence to the.
You have a tour known as Clean Water Them, and using this term, you can easily move downward.
So anyhow, you have to you have to understand what was all about this Ptolemy's select group in our
very first new development.
Yeah.
So basically, basically this totem, Torrance's this term is basically this valuable arm will be nothing
like my previous.
And you can do it as an old and it is nothing but my arm new or I can say new slope.
The new slogan, the thing will by all the slope minus this, this bell em by this with respect to M
or you can see this is my daddy.
This is my daddy.
This is my daddy or my slope into into some learning rate.
We will talk about later.
What is this learning rate and how, how to select a value of learning which is exactly what alpha for
how to select a value and what what is all about learning.
So this is exactly my slope.
I guess this is my slope.
It is this totem, which is exactly my God, what a totem says that I have to subtract.
Basically, I have to subtract slope at that particular point.
You will see here and we are trying to compute it means here we have to subtract this the slope at this
particular point at that one.
What exactly is a slope at this particular point?
What is the slope over here?
What are the slope over?
You will think what?
The slope area.
Well, first, let me let me it is all this thing so that it will not look that much messy like me.
It is all these things.
So what exactly is a slope over here slope we all have done what is a slope at that particular point.
So for this, what do we have to do better?
Just draw a straight line.
We have to just just straight line this, this, this line, this straight and that we have draw that
that could help us to find out that every tip of the slope.
Then then what we have to do, we have to find whether it's slope, it's it's a positive slope or it's
a negative slope.
So you will see basically over here, it is my exactly.
Negative slope.
How.
Because you will see your right hand is pointing towards downward.
Is this the right hand?
Is this this this thing this thing is pointing towards downward?
It means if you're not if not, if it is pointing towards upward, if it is a positive flow, suppose
suppose at this at this particular point.
At this particular point, first, let's say you have some let's say you have some slope if you if you
are going to map.
So if you will, you will definitely get some slope over here.
Let's say you have some slope, lets you have some slope.
What here let's say.
And it goes to zero point one.
Amoco's two zero point one, but much, much more feasible value is one, but your feasible is is one.
So how to read, how to read, find one to one, how to reach.
So basically using our convergent formula and this learning rate whose value is basically low, somewhere
close to zero point zero five to zero point zero zero one, it will definitely die between this range.
Using our SEEMY using cross-validation approaches, we can find out what can be the best value of our
learning.
The question, the question that will come across your mind like we have a value in this.
Why not?
Why don't we have a higher value?
Why don't we have a higher like five than 50?
So we will talk about later.
Why, why, why we can't we can't assume this high value as my learning read.
So if I have, I have to put some values for here.
Let's say here you sat here you have some value and it will nothing.
But here you will see it.
We have some negative stuff.
So it will it will become positive something because it is it is already negative fact.
It will be composter.
So it will it is nothing but is positive.
It is just positive because you will see this, the slope is negative.
Basically this is negative.
But what we have computed being discussed because that the slope is going towards downward slope.
So it will you will see that's a very, very minimum, very minimum number.
That's a very minimum that are against it.
That's a very small value.
It's very minimal value because we all know that this learning result is very low, approx approach,
zero point zero zero one zero zero two.
It's a very low number.
So it means it means it means it's a very low number.
And let's say what we have initial let's say initial values by one.
That that what what that what we have computed this.
Yeah.
Using this, if you have to put all these things, it will become somewhere close to does this something
something zero point something.
So it means using this, using this, using this, doing, doing, doing some iterations you can definitely
beat approx two one approx two one.
Basically it means, it means if you have to do this operation multiple times flexin let's say how this
this is what the Grandison and you have to do this attrition multiple multiplied multiple times until,
unless you reach at this particular point, because this is the one that you have to reach.
So you have to do lots of attrition and you have to keep going on and it will reach.
It will reach at this particular point.
And but but yeah, what if what if we win?
We will we will assume higher value, higher value of the alpha.
So if we if we pursue higher value of Alpha, if we assume higher value of Alpha, so is then moving
downward, is then moving downwards, it will lose zigzag motion like this, like this, like this,
like this.
And it will never reach this global minimum.
So what are you what are the advantages of using higher alpha value?
That's why I always ignore higher alpha.
Never, never, never use a higher value of alpha either.
It will never it will never reach that particular point.
It's what I am trying to that's what I'm trying to confess to.
So basically, once you will achieve this point, basically we all lose this global in math here.
My store will be zero here, my store will be zero and here my store by zero.
It means here my Struble zero and whatever and whatever m whatever and I will achieve over here.
This is an exact value is an exact value of over USD.
But I can say this is the exact value of our best foot line.
This is my best food, like let's say this is my best friend and I go to Amex.
And whatever value you will achieve, this will become this will become this will become this, this
and value.
And so, yeah, this is a point basically this is a point where I have to stop my training because because
we have achieved our best and value.
So I hope you all can digest all these things.
You have some doubts.
You can definitely ask all these things in a personal conversation as part of the Q&A session as well.
So that's all about this linear regression in that.
I hope you I hope you love the session very much so.
Thank you.
How nice to keep learning.
Keep growing, keep practicing.