3 Problems for Assignment 2 - Machine Learning | CS 446, Assignments of Computer Science

Material Type: Assignment; Professor: Roth; Class: Machine Learning; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Fall 2008;

Typology: Assignments

Pre 2010

Uploaded on 03/11/2009

koofers-user-ic1-1
koofers-user-ic1-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS446: Pattern Recognition and Machine Learning Fall 2008
Problem Set 2
Solution Handed In: September 25, 2008
1. [Representing Boolean Functions - 10 points]
a. ¬ABC[3 points]
1
0
0 1
0 1
C
0 1
B
0 1
A
b. (A ¬B) ¬(CD) [3 points]
1
1
0
1 0
0 1
B
0 1
A
0 1
D
0 1
C
1
pf3

Partial preview of the text

Download 3 Problems for Assignment 2 - Machine Learning | CS 446 and more Assignments Computer Science in PDF only on Docsity!

CS446: Pattern Recognition and Machine Learning Fall 2008

Problem Set 2

Solution Handed In: September 25, 2008

  1. [Representing Boolean Functions - 10 points]

a. ¬A ∨ B ∧ C [3 points]

C

B

A

b. (A ∧ ¬B) ∨ ¬(C ∧ D) [3 points]

B

A

D

C

c. (A ∨ B) ⊕ C ∨ A ⊕ (¬B ∧ C)[4 points]

C

C

A

C 1

A

B

Note that although the logical formula is complicated, it only involves three vari- ables so necessarily the tree must be at most depth four. If it was more than that then a variable would appear twice in some path from root, which is unnecessary.

  1. [Space Complexity of Decision Trees - 15 points]

a. The smallest possible decision tree consistent with a hypothesis in Dk contains 2 k + 1 nodes. Every non-leaf node has a branch labeled “1”/“0” (depending on whether xi or ¬xi is in the disjunction, respectively) leading to a leaf node labeled “1” and a branch labeled “0”/“1” leading to another non-leaf node, except for the lowest non-leaf node, that has a branch leading to a leaf node labeled “0”. b. The smallest possible decision tree consistent with a hypothesis in Ck contains 2 k + 1 nodes. Every non-leaf node has a branch labeled “0”/“1” (depending on whether xi or ¬xi is in the conjunction, respectively) leading to a leaf node labeled “0” and a branch labeled “1”/“0” leading to another non-leaf node, except for the lowest non-leaf node, that has a branch leading to a leaf node labeled “1”. c. The smallest possible decision tree consistent with a hypothesis in Pk contains 2 k+1^ − 1 nodes, since we must represent such a hypothesis with a complete binary tree with k + 1 levels. The lowest level contains 2k^ leaf nodes, and every non-leaf node in the next higher level has one child labeled “0” and one child labeled “1”. d. Since the size of the smallest possible tree in each case depends only on k and not n, we can reasonably conclude that a decision tree learning algorithm is a good choice in situations where we believe many of the features are irrelevant. Nevertheless, if we are stuck with Pk as our hypothesis space, decision tree learning is a bad choice. The fact that the smallest possible tree consistent with a hypothesis from Pk has size exponential in k implies that any decision tree learning algorithm must take a long time (computationally) to find a good hypothesis.

  1. [Implementing Decision Trees - 75 points] See the grading comments on your individual homeworks. Some general notes. The target concept of the Badges2 data was any name with a double letter (ie “William”) or a total length (both first and last) of less than or equal to 10 letters (ie “Dan Roth”) is labeled positive. This is a simple to describe concept, but in terms of the base features we gave you it is very complicated, but theoretically