Homework-1-solutions

# Homework-1-solutions - Homework-1 Solutions Question 1 1...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework-1 Solutions Question 1 1. Compute the decision tree generated by ﬁrst considering WRITABLE, then UPDATED, then SIZE. 2. What tree is generated by using ID3? Starting with s = {1, 2, 3, 4, 5, 6}, we have: Entropy (s) Entropy (s|W RIT ABLE ) Entropy (s|U P DAT ED) Entropy (s|SIZE ) = 1.0 = 0.9183 = 0.54 = 0.7925 Gain(s|W RIT ABLE ) Gain(s|U P DAT ED) Gain(s|SIZE ) = = = 0.0817 0.46 0.2075 Therefore, the best choice is UPDATED. This produces the following partition: s1 = {2, 3}, we have Entropy (s1 ) Entropy (s2 ) Entropy (s2 |SIZE ) Entropy (s2 |W RIT ABLE ) = = = = 0 0.811 0 0.5 s2 = {1, 4, 5, 6} Gain(s2 |SIZE ) = Gain(s2 |W RIT ABLE ) = 0.811 0.311 Therefore, the best choice is SIZE. 3. How would these trees classify the following two instances: Tree 1: 1 — text 2 —exe Tree 2: 1 — text 2 — text ...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

Homework-1-solutions - Homework-1 Solutions Question 1 1...

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

View Full Document
Ask a homework question - tutors are online