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

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

View Full Document Right Arrow Icon
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:
Background image of page 1

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

View Full DocumentRight Arrow Icon
The classification error of the A = F child node is: After splitting on attribute B , the gain in error rate is: After splitting on attribute C , the gain in error rate is: The split will be made on attribute B . (c) How many instances are misclassified by the resulting decision tree? Answer : 20 instances are misclassified. (The error rate is 20/100.) (d) Repeat parts (a), (b), and (c) using C as the splitting attribute. Answer
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/25/2010 for the course ASDF 123 taught by Professor Saunders during the Spring '10 term at Aarhus Universitet.

Page1 / 4

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

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online