LFD Book Forum consistency issue on page 65
 User Name Remember Me? Password
 Register FAQ Calendar Mark Forums Read

 Thread Tools Display Modes
#1
04-28-2012, 07:33 PM
 dudefromdayton Invited Guest Join Date: Apr 2012 Posts: 140
consistency issue on page 65

Example 2.8, the target function is sin(pi*x). But both target function graph labels in the second figure show sin(x) instead. Someone in the know should see that the graphed function, its label, and the target function coincide.
#2
04-28-2012, 07:40 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,475
Re: consistency issue on page 65

Quote:
 Originally Posted by dudefromdayton Example 2.8, the target function is sin(pi*x). But both target function graph labels in the second figure show sin(x) instead. Someone in the know should see that the graphed function, its label, and the target function coincide.
Thank you for noticing it. Indeed, it should be .
__________________
Where everyone thinks alike, no one thinks very much
#3
04-28-2012, 08:32 PM
 dudefromdayton Invited Guest Join Date: Apr 2012 Posts: 140
Re: consistency issue on page 65

On the same page, I've been able to confirm the biases stated for H0 and H1, as well as the variance for H0. But for the variance of 1.69 for H1, I am obtaining 2.44 instead.

I have this problem whether I calculate the variance directly, or I calculate the out-of-sample error and subtract the bias.

It would be reassuring if I could show that my 2.44 figure is wrong, but as yet I have not succeeded.
#4
04-28-2012, 10:36 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,475
Re: consistency issue on page 65

Quote:
 Originally Posted by dudefromdayton On the same page, I've been able to confirm the biases stated for H0 and H1, as well as the variance for H0. But for the variance of 1.69 for H1, I am obtaining 2.44 instead. I have this problem whether I calculate the variance directly, or I calculate the out-of-sample error and subtract the bias. It would be reassuring if I could show that my 2.44 figure is wrong, but as yet I have not succeeded.
This is curious. To calculate , you generate the two points and uniformly and independently, then connect them with a line. Since and , you get the equation for the line (tangent to the sine if the two points coincide). You then integrate the difference squared between the line and the sine with respect to (times the probability density which is ) to get for this data set, and double-integrate that with respect to and (times the probability density which is for each variable) to get the expected .

Is this what you have done to come up with a numerical answer equal to ?

Hint: It is much easier to Monte-Carlo.
__________________
Where everyone thinks alike, no one thinks very much
#5
04-29-2012, 05:54 AM
 dudefromdayton Invited Guest Join Date: Apr 2012 Posts: 140
Re: consistency issue on page 65

My ETA having a closer look at this is 1-2 days. Schedule. I'm definitely interested in resolving this matter, and I'm happy to participate.

Update: wrapping up some computations; I'm testing an idea as to what might have happened. But the test is not quick.
#6
04-29-2012, 03:50 PM
 dudefromdayton Invited Guest Join Date: Apr 2012 Posts: 140
Re: consistency issue on page 65

Alas, I got bit by that old dog, numerical instability. When I run 1,000 hypotheses, I get the much higher figure I reported. 10,000 brought me a lot closer, and 100,000 has me at 1.70 variance (and presumably moving in the direction of 1.69).

These tests take a lot longer than they might, because I solve the line equation with w-a-a-y too many CPU cycles. The upside is that the same code works with several other hypothesis sets to meet a short-term need.

I feel in general like I've faced a couple of numerical stability challenges in very recent time, and it's beneficial when students have to deal with it. I imagine there might be more ahead.

Last edited by dudefromdayton; 04-29-2012 at 03:52 PM. Reason: concluding ideas
#7
07-14-2014, 08:45 AM
 BojanVujatovic Member Join Date: Jan 2013 Posts: 13
Re: consistency issue on page 65

It is somewhat late but I'd like to give analytic solution for , bias and var and the verification of values here. Firstly,

and are parameters we get after minimising squared error function on some :

and we can get them by solving the following system of equations (condition for extreme value of function):

The solution is:

Now,

So,

Now we can calculate all the terms:

So, we see that the following holds:

#8
07-15-2014, 07:42 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 595
Re: consistency issue on page 65

Thanks for the detailed analysis
__________________
Have faith in probability

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 08:05 AM.

 Contact Us - LFD Book - Top

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, 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.