Previous models are very popular and are widely used by analysts and data scientists.
A model based on a simple decision tree is very easy to interpret.
And it gives very clear decision points which can be used in making business decisions.
Although a simple decision tree lacks a little bit in terms of accuracy.
But there are variants or advanced techniques based on decision trees, which we will discuss in the
later part of the course using which we can increase the accuracy really significantly.
So if interpretation is your goal, that is you're presenting a concept to people who are not very enthusiastic
about numbers and complex mathematical models.
You should use a simple decision tree, which we will learn first in this.
If prediction accuracy is the goal.
And you can let go of some of the interpretively of the modern.
We must use the advanced techniques that we are going to learn in the later part of Diggles.
OK, so what is our decision tree in a decision tree?
We are trying to split or segment the population into different parts or regions.
And each region has a certain set of characteristics of deep predictor variables.
So in this diffidently.
We are getting finally four regions.
Which are classifying each person in two unfit outfit.
This forest region, which is classifying a person into untracked category, is having two characteristics.
The person which belongs to this region has aged less than 30 and it's a lot of people.
Similarly, for second region ages, there's dentally.
But that person is not eating a lot of people's.
So in this way.
Ah!
Aim is to divide the population into several regions and each region will have a certain collective
stick of deep predictor variables.
Let me give you an example to explain it further.
Suppose you're trying to predict scores of students besides the number of hours they have studied prior
to the exam.
And they're scored in the midterm exams.
We have the data of these 10 students and this, David.
The first column contains the score that they actually scored in the final exam.
Second column has the number of artist studied and third column as the midterm score of the student.
Using this data of Penn students for eleven students, I want to predict this code, given that the
number of hours that he has studied and the midterms code, he has school.
So if we want to build a decision entry, we want to split this data into regions.
If I separate those two things on the basis of number of are studied, that is students who've studied
less than 10 hours can be one group.
And students who study in more than 10 hours prior to the exam can be another group.
Do we see any major difference in this sort of these two groups?
It turns out that there is a major difference in the average score of these two groups.
Students who study less than 10 hours on an average score, thirty nine marks, whereas students will
study more than 10 hours score 75 marks on an average.
So the first step of this entry, you can see these 10 student had an average score of 57, which is
written here.
But this is the entire population.
That is why it is written as a hundred percent.
When I split this population using the Rs variable and check whether the Rs study is less than 10 hours
or more than 10 hours.
I get this decision.
If us today is less than 10.
Then we have this left part in this left part.
Average school student is 39.
And it contains 50 percent of the population.
Since we have 10 students, five students are coming in this side of the tree.
That is, they have studied less than hours.
And the other side.
We have these students were studied more than 10 us.
For them, the average score is seventy five marks.
And they had also the population is 50 percent.
So 50 percent of these two gentlemen left, right, and 50 percent are indeed 80.
Next, if I look at the midterms score of these students, I can further separate this region or this
class of student.
So students who have scored less than sixty five marks on an average scored 70 marks in the final exam.
Which is 30 percent of the total population.
In other words, trees to rent belong to this class.
And if I look at the other Dutch students who have scored more than 65 months in the meter on an average
score, eighty two marks in the final exam.
This class has 20 percent of the total population, which is two students.
Now, if I add more predictive variables in my problem.
And continue making these blit.
We get something which resembles an inverted tree.
This is why such a model is called a decision tree.
You can see how easy it is to interpret this visual representation.
And also, it is giving us some clear, actionable insight.
So if you want to score more in the exams.
Definitely study more than Danas and also try to get more than 65 marks in your midterm exam.
Now, let us see what are the different types of visionaries, so like in machine learning models?
We have two types of models classification indignation in D.C. and also.
We have two types, regression trees and classification trees.
So indivisible, you are predicting, is a quantitative type of variable like height of a person or
number of prospective customers of your business.
Then we be regression, please.
Whereas if the variable is categorical, such as will a player score a goal in the football match?
What does a patient have, heart disease?
This is several reports for such problems.
We drop classification 3s.
We will be discussing both of these types of trees in our course, but we will discuss reignition trees
first.
Before we move further, it is important that we take note of important terminologies related to decision
entries.
Foster's root node, the first node which contains the entire population, which we want to subdivide
into regions, is called the root node.
Root node has a hundred percent of the population.
Then there is the action of splitting, splitting means dividing a region into subregions.
So when we divide this group, node bases us, we are performing an action of splitting.
Then is a decision node.
Every node where we perform splitting is called a decision node.
For example, the root node is also a decision node.
Then when we take a decision here that we are going to split this.
This is the midterms code of student.
This is also a decision node.
Then we have Leif and we lodes.
These are the last nodes beyond which we do not split any further.
So here the second, sixth and seventh Nord, we are not split further, the are the live or determine
load.
Then there is a subtree, a small subsection of the entire tree is called a Sabry.
So if I take out this decision node and these two leaf node in this.
We are containing a subtree.
You'll also hear about bearding and take note.
So whenever we split an old.
That note becomes the bitter note, and the notes that we get after this break are detailed.
So this light blue three note is the bitter note.
And these two, six and seven are detailed note of this better paranoid.
So we'll be using this terminology as we go along this course.
Remember this terminology.
And to you in the next video.