Question 1. Decision Trees
Consider the data in Table 1 for a spam detection system. The attributes or features in our model are three binary features called Viagra?, Inheritance?, and Bulk? that represents whether such word is present in an email or not. The class is spam?
Table 1: Training Data
able[[ID,Viagra?,Inheritance?,Bulk?,Spam?],[1,NO,NO,NO,NO],[2,NO,NO,NO,NO],[3,NO,YES,NO,NO],[4,NO,NO,YES,NO],[5,YES,NO,NO,YES],[6,YES,NO,YES,YES],[7,NO,YES,NO,YES],[8,NO,YES,YES,YES]]
Draw the decision tree induced when learning from this data using the decision tree induction algorithm (Figure 18.5 in the book). Use the information gain as the importance. For each level of the tree, show the gain calculation.
Question 1. Decision Trees
Consider the data in Table 1 for a spam detection system. The attributes or features in our model are three binary features called Viagra?,Inheritance?,and Bulk that represents whether such word is present in an email or not. The class is spam?
Table 1:Training Data ID Viagra? Inheritance? Bulk? Spam? NO NO NO NO 2 NO NO NO NO 3 NO YES NO NO 4 NO NO YES NO 5 YES NO NO YES 6 YES NO YES YES NO YES NO YES 8 NO YES YES YES
Draw the decision tree induced when learning from this data using the de cision tree induction algorithm (Figure 18.5 in the book). Use the information gain as the importance. For each level of the tree, show the gain calculation.