Hello, I am (name) from LearnVern.
In our previous tutorial of Machine Learning we saw a Support vector regressor.
Today, we will see the Decision Tree Regressor.
So, this is also a continuation because we had studied about decision trees even during the solving of classification problems.
Now, we are going to see this again.
So, the decision tree, as we had earlier discussed , solves both the problems that are related to classification and regression, and it follows the tree structure,
Meaning, it gives a decision or we call it as predictions by creating a tree structure.
So, let's understand this even further.
So, it basically breaks down this entire dataset in small parts, so we will pick one column and on that basis we will calculate the output, and on the basis of its output we will divide them into small parts, so if we keep performing this in continuation, then we get our decisions.
So this might be confusing to understand for now, but we will understand this further through an example properly.
So, in this we know that we have root node, interior node and lastly we have leaf node.
So, this root node basically is the first of all the nodes, so the most important feature comes here, thereafter interior nodes, which are also of features, then we call these as decision nodes, and whatever prediction it gives that comes in leaf nodes.
So, let's see ahead, we have seen these types before; for categorical data about that we had seen in classification and now we are looking at continuous variables where it helps in regression.
Now, we will understand this with the help of this example, so now you can see we have outlook, temperature, humidity and windy, so these have some of the other output for it, like here hours played is 26, because it was rainy, hot with high humidity and not windy, then for 26 hrs the game was played.
Then for 30 hrs, when it was windy, high humidity, temperature was hot and it was also rainy, then the game continued for 30 hrs.
So, this is the target variable, meaning the prediction has to be performed on this.
Now, how will that be done?
So, from these we will identify as to which is the most relevant feature and perform accordingly.
So, we have to begin with the most relevant for, so in this way we understood as to how the outlook is the most relevant and made it as our root node,
And after outlook, we have in it rainy, sunny, overcast, so we have these three as an option, so all the data that will come under sunny is mentioned here.
And overcast data has come here, and for rainy all have come here.
So, whenever it is overcast, so it's giving 43…48, and here by calculating an average here an output is Removed as 46.
But here we have windy and temperature as two more categories; in windy either it is true or it is false, so if it is true then the output is 26.5, and if the case is false then it comes as 47.7.
So, in this way first we make a root node, and then we divide the data on the basis of these categories, and after that whatever feature is still remaining, then we further categorise them, and lastly when all the features are completed then we have the only remaining option is of taking the decision.
So, in this way for the regression problem also, we take up the similar approach.
Now, if we talk about its application, then
If we have a Growth perspective, then what are the growth opportunities that are going to come, in such a case we can use a decision tree.
Or, if we have demographic data, and we want to know about the growth of the number of clients, then in such cases also a decision tree can be used.
So, if we have Regression, then we can solve many such problems whether it is house prices, rainfall prediction.. or if it is related to some sales prediction.
Then in all such cases they are the example of regression, where we can use decision tree regressor.
So, friends, let's conclude here for today. We will stop this session here, and it's upcoming parts we will cover in the next session.
Till then keep learning and remain motivated.
If you have any queries or comments, click the discussion button below the video and post there. This way, you will be able to connect to fellow learners and discuss the course. Also, Our Team will try to solve your query.
Share a personalized message with your friends.