Question
A decision tree is used to predict whether a student is likely to play football using the training data below. The algorithm uses the attribute
A decision tree is used to predict whether a student is likely to play football using the training data below. The algorithm uses the attribute selection method to identify the split that produces more sub-nodes that are homogeneous.
Calculate the Gini index and Information Gain for a split on Gender and a split of Class .Show all your steps.
Determine which split should be used on the decision tree (split for Gender or split for Class attribute) if you use:
Gini index
Information gain
Students | Gender | Class | Play Football |
1 | Female | B | Yes |
2 | Female | A | Yes |
3 | Female | B | No |
4 | Female | B | No |
5 | Female | B | No |
6 | Female | B | No |
7 | Female | A | No |
8 | Female | A | No |
9 | Male | B | Yes |
10 | Male | B | Yes |
11 | Male | B | Yes |
12 | Male | B | Yes |
13 | Male | B | Yes |
14 | Male | A | Yes |
15 | Male | A | Yes |
16 | Male | B | Yes |
17 | Male | A | No |
18 | Male | B | No |
19 | Male | B | No |
20 | Male | B | No |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started