{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

solutions3

# solutions3 - Assignment#3 Solutions(Chapter 4 7 The...

This preview shows pages 1–3. Sign up to view the full content.

Assignment#3 Solutions (Chapter 4) 7. The following table summarizes a data set with three attributes A , B , C and two class labels +, −. Build a two-level decision tree. (a) According to the classification error rate, which attribute would be chosen as the first splitting attribute? For each attribute, show the contingency table and the gains in classification error rate. Answer : The error rate for the data without partitioning on any attribute is After splitting on attribute A , the gain in error rate is: After splitting on attribute B , the gain in error rate is: After splitting on attribute C , the gain in error rate is: The algorithm chooses attribute A because it has the highest gain. (b) Repeat for the two children of the root node. Answer: Because the A = T child node is pure, no further splitting is needed. For the A = F child node, the distribution of training instances is:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document