Head on in the previous session, we have learned here what are the basics of PCs and what exactly this
is and what are the factors that will help us to build that decision, which are nothing but an information
again.
And in the previous session, we have learned what is entropy, what is impurity.
Also known how to compute entropy of each and every feature.
That's what we have compute for X, Y and Z as well.
Similarly, now what we have to do, we have to compute information again because whoso our feature
has our highest information, then that feature will get selected as parenteral because major concern
indices a little feature get selected as a parent node.
That's why we have to take care of all these things.
So what we have to do, like we open a new page.
So let's talk about let's talk about what is let's talk about what is information for information is
nothing about.
So basically based on entropy, based on entropy, I can say based on entropy, which one which feature
is going to be highest gain, which is going to gain highest.
So who's a feature?
Who is going to get a highest gain?
Then that feature gets selected as a parent and all this information gain helps us allow to select.
But I know how to compute this.
So we have a simple formula here, which is nothing but my information gain.
Or you can present it Gene or IJI, which is nothing.
But you have you have seen multiple formulas in book.
So here I going say a very simple one.
So it is nothing but my summation of something else and divided by s into entropy of each and every
feature.
So.
So this is nothing but I can say is entropy is giving which one is going to gain are highest.
So there is what is this s what is it.
This is after is nothing.
But let's say, let's say if I will talk about, let's talk about this.
We are excited and we have some output feature based on this data.
I have to break something.
So this is nothing.
But let's say if I will talk about information gained with respect to X, so this is nothing but total
data points to three data points in X.
If I will talk about IJI, I do X, it means information X.
In such case it is nothing but the total data points an X and what is Eli?
Eli is nothing but a copy of X.
What we have computed entropy of X equals to one.
And in the second case, because here we have summation in second give and croppy also X we are is zero
because we have completed in both the scenarios we are acces zero and X is one.
So at the time I have made you understand how to compute it and and you will see it plays a vital role
here and you will think, what is this Essene?
What is this Essid, what is this Essent.
So Essent is nothing but out of total data points out of total datapoints, how many we have all once.
If we have to compete with respect to all of us, to how many we have, all of us.
And if we add to this back to zero to how many we have all zero that.
What is this?
S so let's let's calculate information with respect to each and every future.
Let's let's calculate it.
Let me open a new page.
So here I am going to compute that information gain of X so it is nothing but one minus.
Basically I think we have three months.
Let me open all the previous year I have X here.
We have completed this here.
We have a use case and we here we have this X here.
You will see it is three months and we have total four data points.
It means this, this and here we have this is probability or I guess this is not probability.
This is entropy with respect to access equals to one.
And this is when you X is you, which is nothing but zero.
And this is in terms of lost and if you will computed it is just almost zero point almost almost to
it.
Almost zero point almost.
Let me let me repeat.
So it is nothing, but as we have summation, it's a three by four in two zero point two eight.
Plus, as we have one 0th, one by four into zero, because it is my entropy, we are to zero and it
is my entropy, it is entropy where X is one.
Let's look at what is the meaning of this one, that symbol.
So we have to compute this.
If we have to compute this, it is its value will be somewhere close to paper into this, which is nothing.
But it is approx.
I can say approx.
And some somewhere close to zero point somewhere close to zero point, somewhere close to zero point
or you can see is approx.
Zero point seven nine.
Think you can all in a similar view, you will compete for Jiwon in a similar way, you can compete
for Geetha, let me compute for let me compute for Y and Z.
So you will see with respect to why.
So this is with respect to Y, where you have two, one, two zero and both of you and Robbie with respect
to one and zero is zero exactly zero.
Let me let me die down is nothing.
But it is just nothing but one minus.
Two by four in two, zero plus two by four and two zero.
So it is nothing but just one simple.
Similarly, with respect to that, let me open the previous media.
This is back to that.
Here I have one one and here I have two columns with respect to zero to with one.
So let me write down or do so with respect to this one.
With respect to this here, I have nothing but one minus.
To buy four to one.
Plus this two by four in one, it is nothing but half half, which is one, so it will give me some
results.
So you will see this.
Why has a HIAS information gained?
So it means it means this column gets selected as your parent.
So let me let me construct my decision tree because I could construct we will see this, we will get
selected as my decision or I can say as my parent, not so envie you have to condition.
Basically the first one is when your wise one second on it then Elvi zero.
So so if you see if you will see in this use case when you have one, so you have this much data and
then you have zero, you have this much data.
So let me write down, let me write down then you have one.
When you have one, you have this much data.
And when you have zero, you have this much like me advised on these things, so you have here you have
some free to jack feature and let's say here you have some class.
So in X you have one one and said you have one zero.
And in this class we have forced labor.
And secondly, it was suddenly what?
Here we have X jet.
And on the basis of extra, I have some class.
So here again, you have some one zero one one zero and class level, basically.
Second, second.
So now, again, you would figure out this is a similar kind of statement that we have for you, cause
you will see initially you will see what here this is the similar kind of statement is a similar kind
of statement that we have for now.
You have a similar problem over here.
So what do we have to perform?
Similar kind of operations, similar kind of calculating and Groppi with respect to zero with respect
to one, then we have to compute this information gained and whosoever has the highest that it will
get selected.
So while you're here on all these operations that we have all happened not only in all of our sessions.
So once we will complete everything, once will come to this X, this is it.
Then we have to come to the Zipzer.
So once we will compute each and everything, you will end up having our decision to select it.
We open a new page.
Let's suppose suppose that this is decision which which we will get supples.
This hypothetically, suppose I have some decision based on some condition that said this is my condition,
let's say here, my bet and all that.
Let's just assuming.
So once you will calculate each and every step you will, you will definitely get your decision.
So here in this X, you have some conditions like the ones you see here.
You have some conditional ones, zero.
And on the basis of this, you have something that say you have something, you have something, you
have something and say when you accies when you have something like that and here you have led to something.
It's some support.
Support.
This is that suppose this is this is this is X north.
OK, so then this they're here, you have Allinson condition and here you have again some condition,
some condition let's say here one zero here, one zero let's say here, one zero here again, one zero.
And here you have some labels.
Let's say I have my label, which is mine, nothing but nothing but my guess output I can see.
And here I have it, my first label, similarly overhead, I have like, say, forceable similarly overhead.
And it's I have a second level.
Second level.
It's second level.
So this is also my second.
So this all out of my second said this is my final decision tree next to this is my final decision tree
that I have achieved after doing all the operations, after calculating entropy, then information gate,
then we will end up having this beautiful decision tree for my use is that we use this, we have sepals.
I have some Bastida suppose Mike tested like say zero zero one.
Let's say I have access zero y as let's say 007 and I have the product, I have a pellet.
What can be the label for this.
What can the label for this.
For what we have to do.
Basically we have I was this tree sample.
That's it.
You will see when you exit zero at any wires you will see.
So initially you try zero.
So we have to come in this here you that is when we have to come over here and hear your exit zero zero
X, as you said, it means this is your final output that my model that made this season.
Trivellato Simple.
So we have to basically follow the hierarchy for whatever hierarchy that will come at the time of your
training, the similar hierarchy.
We have to follow at a time of testing at the time of prediction.
Now you will see.
Yeah, that's OK.
Now, I have very much converted with this decision tree in case of classification.
In case of classification, definitely because we have a lot, a lot regarding this.
But you will think, what if we have a regression?
You guess what if we have a discussion, let me open a new page.
Let me open it.
Let's see what if we have a regression or you then say, what if your data is not in the form of zeros
and ones because it wasn't in the I love you.
You don't have written the form of zeros and ones.
The what?
What do you have to do in such case?
Let's say let's say my data, let's say my data this time.
Any form of some, let's say, some continuous nature that exactly and just in our real world scenarios,
you will see let's say you have X, let's say here my X is let's say five forward five similarly invite.
I have something like, say, six to it and said I have something like seven to ten and let's say the
respectless, I have some output feature.
That's my output is first class.
Second, let's say I have some this one I have this one scenario.
Let's say this is this is still this is still my classification use case.
But but my continuous features are more realistic.
They are.
They are they are somehow related to my real world scenarios.
Because you will see in the other scenarios you don't have over here as zero zero one or you would almost
have this this this numerical kind of data.
So how to how to build such a decision.
So in such case, what we will do basically we will compute, we will compute mean mean a long column.
Let's say that with respect to X, that's respect to X.
So what we will do, we will see it mean is approx four point six one.
So what we will do, we will basically split it on the basis of discrimination here and here.
I'm going to say wherever it is, less than four point six seven, I have to accept the season and whenever
it is greater than four point six seven, I have to be some.
This is this is a gender approach that we have to follow.
Or it could be also possible that we can have multiple branches, we can have multiple branches, let's
say let's say between somewhere between zero to five range here.
Let's say I have some five to it here.
I have some Melonie.
And here let's say I have greater than Gwendolyn's.
I have multiple branches as well.
So that's how you that's how you deal with this type of this type of scenarios.
So in the upcoming session, we are going to learn how to build how to build your season tree using
Guinean nephews in your Guinea.
Berbee This is this is of the technology at how you can build a decision tree.
So that's all about decision.
Hopefully you will love it very much.
Thank you.
How can I stay?
Keep learning.
Keep growing, keep practicing.