LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Chapter 2 - Training versus Testing (http://book.caltech.edu/bookforum/forumdisplay.php?f=109)
-   -   Exercises and Problems (http://book.caltech.edu/bookforum/showthread.php?t=258)

 yaser 03-24-2012 11:25 PM

Exercises and Problems

Please comment on the chapter problems in terms of difficulty, clarity, and time demands. This information will help us and other instructors in choosing problems to assign in our classes.

Also, please comment on the exercises in terms of how useful they are in understanding the material.

 tadworthington 07-02-2012 01:36 PM

ERRATA: Small mistake in description of Exercise 2.1

I won't "mathify" this correction, as I don't know how in this forum (my LaTex has escaped me after years of neglect!). It's a minor point, but I feel like it should be corrected. In the wording for Exercise 2.1 on page 45:

ERROR: "Verify that m_H(n) < 2^k"
CORRECTION: "Verify that m_H(k) < 2^k"

Thanks!

 yaser 07-02-2012 02:58 PM

Re: ERRATA: Small mistake in description of Exercise 2.1

Quote:
 Originally Posted by tadworthington (Post 3334) I won't "mathify" this correction, as I don't know how in this forum (my LaTex has escaped me after years of neglect!). It's a minor point, but I feel like it should be corrected. In the wording for Exercise 2.1 on page 45: ERROR: "Verify that m_H(n) < 2^k" CORRECTION: "Verify that m_H(k) < 2^k" Thanks!
Thank you for catching this!

 vsthakur 08-24-2012 08:20 AM

Problem 2.9 : Growth function of perceptron, seems incorrect

The problem says that in case of perceptron in d-dimensional space, growth function is equal to B(N,k). Consider the following case :

d = 2, implies dvc = 2+1 = 3
N = 4
B(N,k) = 15
but the maximum no. of dichotomies possible in this case is only 14

Can someone please comment if i am missing something.

Thanks.

Vishwajeet.

 magdon 08-24-2012 12:17 PM

Re: Problem 2.9 : Growth function of perceptron, seems incorrect

Thanks for catching this erratum. The problem shows the upper bound based on the VC dimension. The actual growth function is given by: .

Our appologies.

Quote:
 Originally Posted by vsthakur (Post 4384) The problem says that in case of perceptron in d-dimensional space, growth function is equal to B(N,k). Consider the following case : d = 2, implies dvc = 2+1 = 3 N = 4 B(N,k) = 15 but the maximum no. of dichotomies possible in this case is only 14 Can someone please comment if i am missing something. Thanks. Vishwajeet.

 vsthakur 08-25-2012 08:04 PM

Re: Problem 2.9 : Growth function of perceptron, seems incorrect

Thank you

 vsthakur 08-29-2012 01:39 AM

Re: Problem 2.9 : Growth function of perceptron, seems incorrect

Sorry for the delayed response here, but i still find that is not the case for a perceptron in d-dimensional space.

When N=6 and d=2, this equation says , while i was able to get 38 dichotomies (by picking 6 equidistant points on the circumference of a circle).

If i am missing something, then can you please point me to the proof.

Thank you.

 vsthakur 08-29-2012 02:10 AM

Problem 2.10

To prove : As this is a generic statement, it has to apply to every growth function. But all we know about the growth functions (in general) is their bound, in terms of and .

Also, we know that if then is an increasing function whose value is . But, if , then we can only say that is non-decreasing and is bounded by .

I guess my question is that how can we prove the generic statement above. Kindly shed some light on the proof strategy.

Thank you,

Vishwajeet.

 vsthakur 08-29-2012 06:46 AM

Possible correction to Problem 2.14 (b)

The problem says,

(b) Suppose that satisfies . Show that .

I suppose it should say,

(b) Suppose that satisfies . Show that .

If this is indeed the case, then can you please clarify part (c) as well.

Thank you,

Vishwajeet.

 magdon 08-29-2012 08:30 AM

Re: Possible correction to Problem 2.14 (b)

The problem, though an over-estimate seems correct.

Hint: If you have points, then can implement at most dichotomies on those points. Now try to upper bound the number of dichotomies that all hypothesis sets can implement on these points and proceed from there.

Quote:
 Originally Posted by vsthakur (Post 4579) The problem says, (b) Suppose that satisfies . Show that . I suppose it should say, (b) Suppose that satisfies . Show that . If this is indeed the case, then can you please clarify part (c) as well. Thank you, Vishwajeet.

 yaser 08-29-2012 11:44 AM

Re: Problem 2.10

Quote:
 Originally Posted by vsthakur (Post 4571) But all we know about the growth functions (in general) is their bound
Actually, we also know the definition of growth functions, and this may be the key to answering the question.

 htlin 08-29-2012 07:09 PM

Re: Problem 2.9 : Growth function of perceptron, seems incorrect

Quote:
 Originally Posted by vsthakur (Post 4570) Sorry for the delayed response here, but i still find that is not the case for a perceptron in d-dimensional space. When N=6 and d=2, this equation says , while i was able to get 38 dichotomies (by picking 6 equidistant points on the circumference of a circle). If i am missing something, then can you please point me to the proof. Thank you.
I checked the case you are describing, and the number of dichotomies in the case is . (Hint: did you double-calculate the case of 3-positive and 3-negative?) Hope this helps.

 vsthakur 08-30-2012 03:45 AM

Re: Problem 2.9 : Growth function of perceptron, seems incorrect

Quote:
 Originally Posted by htlin (Post 4612) I checked the case you are describing, and the number of dichotomies in the case is . (Hint: did you double-calculate the case of 3-positive and 3-negative?) Hope this helps.
You are right, that was the mistake. My apologies.
Thank you.

 vsthakur 09-01-2012 09:34 AM

Re: Problem 2.10

Quote:
 Originally Posted by yaser (Post 4598) Actually, we also know the definition of growth functions, and this may be the key to answering the question.
I think i get it now. Let . Now, if we partition any set of points into two sets of points each, each of these two partitions will produce dichotomies at best. If we now combine these two sets, then the maximum no. of dichotomies possible will be the cross product of the two sets of dichotomies (with N points each), i.e., Thank you.

 vsthakur 09-01-2012 09:46 AM

Re: Possible correction to Problem 2.14 (b)

Quote:
 Originally Posted by magdon (Post 4584) The problem, though an over-estimate seems correct. Hint: If you have points, then can implement at most dichotomies on those points. Now try to upper bound the number of dichotomies that all hypothesis sets can implement on these points and proceed from there.
Got it, thanks. The inequality should be strict i think ( ).

 magdon 09-03-2012 05:54 AM

Re: Problem 2.10

Yes, well done.

Quote:
 Originally Posted by vsthakur (Post 4743) I think i get it now. Let . Now, if we partition any set of points into two sets of points each, each of these two partitions will produce dichotomies at best. If we now combine these two sets, then the maximum no. of dichotomies possible will be the cross product of the two sets of dichotomies (with N points each), i.e., Thank you.

 doris 09-22-2012 02:00 PM

Problem 2.3 c

the last comment confused me a little bit.
For a given set of N points, we should change the center of the sphere to get as many dichotomies as we can, thus measuring the effective number of hypotheses (spheres) in this hypothesis set.

Does it make sense to move project the spheres from 3D to 1D and look at the problem as intervals of +1 for a<=x<=b and -a>=x>=b?

 magdon 09-23-2012 09:42 AM

Re: Problem 2.3 c

You will note from the definition of the hypothesis set: contains functions which are +1 for You only get to vary , and so the two spheres are restricted to be centered on the origin.

And yes, the for this hypothesis set is very related to the growth function for positive intervals.

Quote:
 Originally Posted by doris (Post 5695) the last comment confused me a little bit. For a given set of N points, we should change the center of the sphere to get as many dichotomies as we can, thus measuring the effective number of hypotheses (spheres) in this hypothesis set. Does it make sense to move project the spheres from 3D to 1D and look at the problem as intervals of +1 for a<=x<=b and -a>=x>=b?

 mileschen 09-23-2012 05:19 PM

Problem 2.15

In (a), it said that we should provide a monotonic classifier. Then, why there are +1 and -1 regions?

Also, as it said in (b) that generating the next point by increasing the first component and decreasing the second component. Then, how can we determine which point is larger? Because X1>=X2 if and only if the inequality is satisfied for every component. However, the next point is just with one component larger than that of the first one, while another component is less than that of the first one. So, it's a little confusing.

 magdon 09-23-2012 07:23 PM

Re: Problem 2.15

The function is +1 in some region and is -1 in the complement - i.e. it takes on two values. Any function can be monotonic, even one that takes on just 2 values.

In (b), you are asked to compute m(N). To compute m(N) you need to count the maximum number of implementable dichotomys on some N points. The problem suggest a set of N points which might be helpful. The fact that no point is larger than another is crucial [hint: because if a point were larger than another, there is a dichotomy that you cannot implement].

Quote:
 Originally Posted by mileschen (Post 5745) In (a), it said that we should provide a monotonic classifier. Then, why there are +1 and -1 regions? Also, as it said in (b) that generating the next point by increasing the first component and decreasing the second component. Then, how can we determine which point is larger? Because X1>=X2 if and only if the inequality is satisfied for every component. However, the next point is just with one component larger than that of the first one, while another component is less than that of the first one. So, it's a little confusing.

 rozele 09-28-2012 05:30 PM

Exercise 2.4b

The final part of the hint in this question says:
"Now, if you choose the class of these other vectors carefully, then the classification of the dependent vector will be dictated."
The other vectors refers to the set of linearly independent vectors that make up the d+2th vector. What do you mean by class? Do you mean class of vector, (e.g., unit vector), or class based on the PLA algorithm (i.e., +1 or -1)?

 magdon 09-29-2012 06:00 AM

Re: Exercise 2.4b

Class means . (Note: there is no PLA or algorithm here; the VC dimension has only to do with the hypothesis set.)

At this point you have established that some input vector is linearly dependent on the others. If you assign the class ( ) of the other vectors appropriately, you should be able to show that the linear dependence dictates that the class of must be (say) +1. This means you cannot implement -1 with the other points having those appropriately chosen classifications, and hence this data set cannot be shattered.

This argument will apply to any data set of d+2 points, and so you cannot shatter any set of d+2 points.

Quote:
 Originally Posted by rozele (Post 5934) The final part of the hint in this question says: "Now, if you choose the class of these other vectors carefully, then the classification of the dependent vector will be dictated." The other vectors refers to the set of linearly independent vectors that make up the d+2th vector. What do you mean by class? Do you mean class of vector, (e.g., unit vector), or class based on the PLA algorithm (i.e., +1 or -1)?

 nahgnaw 09-29-2012 08:44 PM

Problem 2.24

When we design the numerical experiment, shall we randomly generate more datasets to determine g_bar(x), E_out, bias, and var?

 magdon 09-30-2012 04:16 AM

Re: Problem 2.24

Yes, when computing bias and var numerically you need to generate many data sets. For example, is the average function that results from learning on each of these data sets.

Quote:
 Originally Posted by nahgnaw (Post 5955) When we design the numerical experiment, shall we randomly generate more datasets to determine g_bar(x), E_out, bias, and var?

 RicLouRiv 07-11-2017 04:15 AM

Re: Exercises and Problems

Professor -- in my version of the text, for 2.14.b, the inequality is: .

It looks like others are using a version of the inequality that is: ,

which I think makes the problem a little more transparent. I'm wondering if there's a typo in my version? If not, any additional hints on how to treat this version of the inequality would be helpful.

 All times are GMT -7. The time now is 11:24 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.