Question: Write python code to implement a Decision tree using the attached training dataset we have to select the best attribute at the root level. Implement
Write python code to implement a Decision tree using the attached training dataset we have to select the best attribute at the root level. Implement IG Gain Ratio and Gini Index for selecting the attribute at the root level. Then return the corresponding attribute.Then consider the children of that node as leaf nodes considering the greatest number of examples. In case of tie you can consider that leaf node as Yes node.Then return the tree.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
