Hello.
So today we are going to learn what exactly is this decision tree, which is a machine learning algorithm
and what type of use cases you can perform this decision tree.
And we are also going to learn how you can build this decision tree and what a decision tree decision
tree is basically a classification, basically a classification.
It means whenever you have a use case of, let's say, multiple sources, let's say you have to predict
something like 10 Tom-Tom zero one to predict in terms of multiple classes.
So in that type of scenario, this is ostensibly used similarly in case of regression.
So you might have heard this is a tree is a classic, Elgort definitely is a classification, but it's
it's not ruled that it's only a classification algorithm.
It is still using this regression Eustace's.
So what exactly is decision tree.
So this is a tree.
I can see it is exactly a base algorithm.
It is a base algorithm which is used in every conceivable technique.
Like random forest.
Like random forest, like, like activist.
So it is basically it is basically a base algorithm which is used in every conceivable technique.
So so how how this works.
So they are just nothing, but they are just combination of the combination of multiple disguises and
the use of other approaches as well.
Let's say they do some belly approach, similar needs active as well.
It is just a collection of Multiplex's entries.
So this season is exactly a base algorithm and literally it is extensively demanded algorithm type industry
and it is used in each and every conceivable learning algorithm that said Random Forest Act and many
others.
So what exactly is the dictionary?
So this is a tree if summarize it or I can say if I have to explain it in a very limited one.
So it is just it is just like a rule-based kind of thing like say according to some conditions, how
you have to proceed.
Let's say my condition is let's say my condition is whenever let's say this is my time, let's say whenever
my time is less, then less less than nine p.m. So I'm not going to party.
Or if the time is greater than nine p.m., I would basically I would enjoy a party.
So whenever you have that type of use cases, whenever you have that type of I can see condition.
So this is exactly right.
This is a..
So let me consider I use this to explain it in a very easiest way I can consider it.
Let's say let's say you are going for a party.
Let's say you are just going for a party.
Let's say you are going for a party, let's say.
And here you have let's say you have you have to take some decisions.
So what type of decisions you can take.
Let's see if time is if time is greater, then then you see, in such case, you can take to the seasons
if the US if time is greater than 10 years.
So in such case, you don't have to let's say this is my first decision.
You don't have to go, which means you don't have to go.
But what if what if it is less then then in such case, we have to consider.
Let's get out of that this season.
Yeah.
Do you have money?
So if you are here, I am going to, again, have some connection, let's say here I have another condition.
If I have money, let's see here, I going to say I have money and here I want it.
I don't have money.
So if you don't have money, it makes no sense.
It means I'm not going for a party.
So here you can say don't go.
And if I have money, it means I can say, yeah, I'm going.
For a party.
That's simple, it means whenever you have to go for a party that you have a certain kind of condition,
then that time will be less than 10 p.m. and you must have money, basically.
So if we want to go for a party, you have certain kind of conditions.
So that's how the system works.
Let's say you have to create let's it let's say you have to create data of this.
Let's say you have to create data of this.
This is entry.
So the major thing that you will notice over here that there are two factors, basically my time, basically
my time and my money that plays important role over here.
So whatever decisions we are going to take, basically that end badly depends on this time and this
money.
So here I would say time and money.
So basically based on time and money, I had to somebody sees a.
So this will be my entire data.
I would fill some random I'm dyslexic.
My time will be 12.
Let's see my times and let's say my time is nine p.m. Let's see.
My time is eight.
These are my random entries.
And here I'm going to say, let's see.
Yeah, I have money.
And here I'm going to say, no, I don't have money here as well.
I no, I have gold happening here.
I would say, yes, I have money.
So one hour this time is less than 10.
And you have money.
Definitely you can go.
Similarly, we're here, no, you're going to go because time is greater than 10 p.m., similarly,
we're here.
You can't go similarly overhead.
Can't do it.
This is a youth.
So this is this is a new skill that you have.
So this is I guess you have let's say and let's say you have to pay for some data.
Let's say you have to predict for next year for what?
If you have time is seven and you have money and you have to pay for this.
So the question will arise how you can pay for this if you don't have this this season.
So what we will do instead is let me open a new page.
So what we will do is we try to build a season three here so that we can come up with some conclusion,
so that we can come up with some decision for what we will do.
We will try to build some this season.
We were here.
But the major concern over here is which feature will be selected as my road because you would also
like Milbon previous.
You would also hear time is 10:00 p.m. here, here.
Your time is exactly at overload and these are all your subsequence not.
But let's say you have this data.
So you have this let's say this is exactly my data.
This is my use case that I have to solve.
And let's say you have to create a decision realistic and on the basis of this disease.
And then you have then you can only predict when your time is seven and when you have money and you
have to plan for this.
So how you can how you can build up having your decision.
The major concern is this.
So basically, they are there are some terminologies in this country that will definitely solve this
issue to come up with some decision.
So definitely we have some technologies in this country that say we have some form known as entropy
and information.
So using using this entropy information, you can come up having some kind of decision and similarly
using Guiney index against the Guinea index, or you can also term it as Guinea or whatever.
Both are similar.
So using this entropy information gain and doing next, I that you can go ahead with this one or you
can go ahead with this one.
Yeah.
Calculation wise, it is a little bit complex, this entropies.
Little bit complex.
Yeah, but but in some other use cases it is a vital role.
But the calculation, it is just like a piece of cake.
So let's consider a use case so that I can explain all these terms, whether it be information gain
in Index Guinea and all these things like that.
And we have also something like a pruning we had that I definitely bleep moaning and groaning.
So what are these basically?
So whenever you have some overfitting, whenever you have some overfitting situation in your decision
tree at that time, we have to prep you using you have to using this pre and post pruning what this
is what exactly this this is.
And let's say let's say at the time of training your model, you have let's say ninety five percent
accuracy, let's you have some 95 percent accuracy.
But whenever you test datacom, whenever the test data comes or whenever our use of unsign data comes,
your accuracy goes down to 60 percent.
So you can observe over here at the time of your training, you have good accuracy, but at the time
of prediction, you don't have that much accuracy.
Accuracy goes downward.
So whenever you have this awful type of condition at that time, I have to use my pre and post bruening
conditions.
So that's all about the session.
In the upcoming session, we to saw some use cases so that I can build up having some disease and using
this and Trappy and drop them as well as this Jenene, this technology.
So then all of our upcoming session, we are going to learn all about this.
So that's all about the session.
Hopefully you will love it.
Thank you.
Have a nice day.
Keep learning.
Keep growing.
Keep practicing.