

Axis aligned rectangles: An axis aligned rectangle classifier in the plane is a classifier that assigns the value 1 to a point if and only if it is inside a certain rectangle. Formally, given real numbers a1??b1?,a2??b2?, define the classifier h(a1?,b1?,a2?,b2?)? by h(a1?,b1?,a2?,b2?)?(x1?,x2?)={10? if a1??x1??b1? and a2??x2??b2? otherwise ?. The class of all axis aligned rectangles in the plane is defined as Hrec 2?={h(a1?,b1?,a2?,b2?)?:a1??b1?, and a2??b2?}. Note that this is an infinite size hypothesis class. Throughout this exercise we rely on the realizability assumption.
1. Let A be the algorithm that returns the smallest rectangle enclosing all positive examples in the training set. Show that A is an ERM. 2. Show that if A receives a training set of size ??4log(4/?)? then, with probability of at least 1?? it returns a hypothesis with error of at most ?. Hint: Fix some distribution D over X, let R?=R(a1??,b1??,a2??,b2??) be the rectangle that generates the labels, and let f be the corresponding hypothesis. Let a1??a1?? be a number such that the probability mass (with respect to D ) of the rectangle R1?=R(a1??,a1?,a2??,b2??) is exactly ?/4. Similarly, let b1?,a2?,b2? be numbers such that the probability masses of the rectangles R2?=R(b1?,b1??,a2??,b2??),R3?=R(a1??,b1??,a2??,a2?),R4?=R(a1??,b1??,b2?,b2??) are all exactly ?/4. Let R(S) be the rectangle returned by A. See illustration in Figure 2.2. Figure 2.2 Axis aligned rectangles. - Show that R(S)?R?. - Show that if S contains (positive) examples in all of the rectangles R1?,R2?,R3?,R4?, then the hypothesis returned by A has error of at most ?. - For each i?{1,…,4}, upper bound the probability that S does not contain an example from Ri?. - Use the union bound to conclude the argument. 3. Repeat the previous question for the class of axis aligned rectangles in Rd. 4. Show that the runtime of applying the algorithm A mentioned earlier is polynomial in d,1/?, and in log(1/?).