CS446: Pattern Recognition and Machine Learning Problem Set 4 - Prof. Dan Roth, Assignments of Computer Science

Problem set 4 for the cs446: pattern recognition and machine learning course, which was handed out on october 9, 2008, and was due on october 20, 2008. The problem set includes instructions for students, as well as three problems related to margin computation, vc dimension, and constructing kernels. The problems involve calculating margins for given datasets, determining linear threshold functions and minimum distances for different concepts, and understanding the vc dimension and constructing kernels.

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-hcb
koofers-user-hcb 🇺🇸

8 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 4
Handed Out: October 9, 2008 Due: October 20, 2008
Feel free to talk to other members of the class in doing the homework. I am more concerned that
you learn how to solve the problem than that you demonstrate that you solved it entirely on your
own. You should, however, write down your solution yourself. Please try to keep the solution brief
and clear.
Feel free to send me email or come to ask questions regarding this handout or conceptual issues.
Please, no handwritten or hard copy solutions.
The homework is due at 4:00 pm on the due date. Email your write-up to the TA. Please put
<userid>CS446 hw4 submission” as the subject line of the email when you submit your homework
1. [Computing Margins - 35 points]
The margin of a set of points {x1, x2,...,xm}is defined to be the distance of the closest
point to the hyperplane w·xcθ= 0.
The margin γis thus:
γ=mini
w·xiθ
kwk
(a) In the file hw4 1a.dat we have given you set of 50 points in {0,1}20: 20 dimen-
sional binary vectors.
Using the hyperplane w <20:
w=<1,1,1,0,1,0,0,0,0,0,1,1,1,0,1,1,0,0,0,1>, θ = 1.5
Classify each of the points in hw4 1a.dat and compute the margin of this data
set with respect to this hyperplane. (No code is needed for any of these problems
though. Do the calculations however you please.) [5 points]
(b) Now using the sparse disjunction x3x6x9x12:
i. Come up with a linear threshold function that represents this concept. Using
this hyperplane, label hw4 1a.dat and compute the margin. [5 points]
ii. What is the minimum distance between a positive and negative example. [5
points]
(c) Now using the denser disjunction x2x4x6x8x10 x12 x14 x16 x18:
i. Come up with a linear threshold function that represents this concept. Using
this hyperplane, label hw4 1a.dat and compute the margin. [5 points]
ii. What is the minimum distance between a positive and negative example. [5
points]
1
pf3

Partial preview of the text

Download CS446: Pattern Recognition and Machine Learning Problem Set 4 - Prof. Dan Roth and more Assignments Computer Science in PDF only on Docsity!

CS446: Pattern Recognition and Machine Learning Fall 2008

Problem Set 4

Handed Out: October 9, 2008 Due: October 20, 2008

  • Feel free to talk to other members of the class in doing the homework. I am more concerned that you learn how to solve the problem than that you demonstrate that you solved it entirely on your own. You should, however, write down your solution yourself. Please try to keep the solution brief and clear.
  • Feel free to send me email or come to ask questions regarding this handout or conceptual issues.
  • Please, no handwritten or hard copy solutions.
  • The homework is due at 4:00 pm on the due date. Email your write-up to the TA. Please put “ CS446 hw4 submission” as the subject line of the email when you submit your homework to [email protected].
  1. [Computing Margins - 35 points] The margin of a set of points {x 1 , x 2 ,... , xm} is defined to be the distance of the closest point to the hyperplane w · xc − θ = 0. The margin γ is thus:

γ = mini

∣w· ‖xwi−‖θ

(a) In the file hw4 1a.dat we have given you set of 50 points in { 0 , 1 }^20 : 20 dimen- sional binary vectors. Using the hyperplane w ∈ <^20 :

w =< − 1 , 1 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , − 1 , 1 , − 1 , 0 , 1 , 1 , 0 , 0 , 0 , − 1 >, θ = 1. 5

Classify each of the points in hw4 1a.dat and compute the margin of this data set with respect to this hyperplane. (No code is needed for any of these problems though. Do the calculations however you please.) [5 points] (b) Now using the sparse disjunction x 3 ∨ x 6 ∨ x 9 ∨ x 12 : i. Come up with a linear threshold function that represents this concept. Using this hyperplane, label hw4 1a.dat and compute the margin. [5 points] ii. What is the minimum distance between a positive and negative example. [ points] (c) Now using the denser disjunction x 2 ∨ x 4 ∨ x 6 ∨ x 8 ∨ x 10 ∨ x 12 ∨ x 14 ∨ x 16 ∨ x 18 : i. Come up with a linear threshold function that represents this concept. Using this hyperplane, label hw4 1a.dat and compute the margin. [5 points] ii. What is the minimum distance between a positive and negative example. [ points]

(d) What may explain the differences in minimum distances between positive and negative examples in the two concepts above? What do the margins and separat- ing distance in part (c) and (d) tell you about the difficulty of learning a sparse vs. dense disjunction? [10 points]

  1. [VC Dimension - 35 points]

(a) Consider the following learning task. Examples are points (x, y) ∈ <^2. The concept space H is the collection of all hinged lines. That is, each concept h ∈ H is formed by two lines that intersect at a point and divide the plane based on their intersection. We can define this space by a, b, c, d, e, f ∈ < such that example (x, y) is labeled positive if and only if (a ∗ x + b ∗ y > c and d ∗ x + e ∗ y > f ), and the first line segment (a ∗ x + b ∗ y = c) is not parallel to the second line segment (d ∗ x + e ∗ y = f ). See figure 1.

Give the VC dimension of H, and justify your answer. [10 points] (b) Now assume that the concept space H′^ is the collection of all 2-hinge lines. That is, each concept h′^ ∈ H′^ is formed by a boundary of three line segments with two hinges, defined by a, b, c, d, e, f, g, h, i ∈ < such that example (x, y) is labeled positive if and only if (a ∗ x + b ∗ y > c and d ∗ x + e ∗ y > f and g ∗ x + h ∗ y > i) and the sequential line segments are not parallel. Give the VC dimension of H′, and justify your answer. [10 points] (c) What is the VC dimension of the space of K-hinge lines, in other words the boundary is made up of K + 1 line segments? Justify your answer. How many parameters are necessary to specify a hypothesis in said K-hinge space. [15 points]