![]() ![]() P & q is probability of success and failure respectively in that node. Hence, the node split will take place on Gender. Gini score for Split on Gender < Gini score for Split on Class.Īlso, Gini score for Gender < Gini score for root node. Calculate weighted Gini for Split Class.Now, I want to identify which split is producing more homogeneous sub-nodes using Gini index. In the snapshot below, we split the population using two input variables Gender and Class. – Referring to example used above, where we want to segregate the students based on target variable ( playing cricket or not ). Calculate Gini for split using weighted Gini score of each node of that split.Calculate Gini for sub-nodes, using formula sum of square of probability for success and failure (1 - p 2 - q 2).CART (Classification and Regression Tree) uses Gini method to create binary splits.Higher the value of Gini higher the homogeneity.It works with categorical target variable “Success” or “Failure”.Gini index says, if we select two items from a population at random then they must be of same class and probability for this is 1 if population is pure. So, This approach is called Continuous Variable Decision Tree. In this case, we are predicting values for continuous variable. But, we know that this is an important variable, then we can build a decision tree to predict customer income based on occupation, product and various other variables. Now, suppose insurance company does not have income details for all customers.So, the decision tree approach that will be used is Categorical Variable Decision Tree. Let’s say we have a problem to predict whether a customer will pay his renewal premium with an insurance company ( Yes/ No).įor this we are predicting values for categorical variable.Decision Tree has continuous target variable then it is called as Continuous Variable Decision Tree.Decision Tree which has categorical target variable then it called as categorical variable decision tree.Types of decision tree is based on the type of target variable we have. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |