 LFD Book Forum Hw4 q4

#1
 silvrous Member Join Date: Apr 2012 Posts: 24 Hw4 q4

What is the range of a? [-1,1] of [-INF, +INF] ?
#2
 kkkkk Invited Guest Join Date: Mar 2012 Posts: 71 Re: Hw4 q4

From my testing, a is within +/- pi.
This follows from the max/min gradient of sin(pi.x) = pi . cos(pi . x)
It is ok to use a larger range, just that the program will run slower.
#3
 silvrous Member Join Date: Apr 2012 Posts: 24 Re: Hw4 q4

Thanks, but now I think I've hit another snag. Is the bias in class surely 0.21? My calculation shows it as exactly 0.31...
#4
 Tyler Junior Member Join Date: Apr 2012 Posts: 9 Re: Hw4 q4

I can't help with that but I have a more basic question. To get ax on two points, do we take the "a" based on the average of the two points

(y1+y2)/(x1+x2)
-or-

calculate "a" on each point and take the average?
1/2 (y1/x1 + y2/x2)
#5
 silvrous Member Join Date: Apr 2012 Posts: 24 Re: Hw4 q4

The two give very different results, but shouldn't they be equivalent in grading?
#6 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477 Re: Hw4 q4

Quote:
 Originally Posted by Tyler I can't help with that but I have a more basic question. To get ax on two points, do we take the "a" based on the average of the two points (y1+y2)/(x1+x2) -or- calculate "a" on each point and take the average? 1/2 (y1/x1 + y2/x2)
Choose the value of that minimizes the average mean-squared error on the two points.
__________________
Where everyone thinks alike, no one thinks very much
#7
 jmknapp Member Join Date: Apr 2012 Location: Columbus OH USA Posts: 14 Re: Hw4 q4

I don't think (y1+y2)/(x1+x2) is valid, i.e., not the best choice for the line a*x. Maybe 1/2*(y1/x1 + y2/x2) is close but is it correct?

Seems like the way to go is to get a formula for the distance function (squared distance) and then minimize it. The answer from that process differs from 1/2*(y1/x1 + y2/x2).

EDIT: Prof. Mostafa posted while I was checking that result.
#8
 kurts Invited Guest Join Date: Apr 2012 Location: Portland, OR Posts: 70 Re: Hw4 q4

Quote:
 Is the bias in class surely 0.21?
In class, the hypothesis that resulted in a bias of 0.21 was of the form ax+b, where the line was free to be offset from the origin. In this problem, b is restricted to be 0, so one would expect the bias to be different.
#9
 kkkkk Invited Guest Join Date: Mar 2012 Posts: 71 Re: Hw4 q4

Quote:
 Originally Posted by kurts In class, the hypothesis that resulted in a bias of 0.21 was of the form ax+b, where the line was free to be offset from the origin. In this problem, b is restricted to be 0, so one would expect the bias to be different.
In Lecture 8 slide 15, for y=ax+b, g_bar passes through the origin even though it is not forced to. This is reasonable due to the 'symmetry' of the curve.

 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded 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 07:08 AM.