LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 4 (http://book.caltech.edu/bookforum/forumdisplay.php?f=133)
-   -   Q4) h(x) = ax (http://book.caltech.edu/bookforum/showthread.php?t=959)

 Moobb 04-28-2013 04:13 PM

Re: Q4) h(x) = ax

Spent a good hour breaking my head trying to figure out where I was going wrong, finally decided to submit my best shot and can finally see what was going on!! :eek:
Thanks for the answer, somehow I was thick enough not to see what was right in front of me..

 vsuthichai 04-29-2013 02:10 AM

Re: Q4) h(x) = ax

Quote:
 Originally Posted by Anne Paulson (Post 9109) So, in this procedure we: Pick two points; Find the best slope for those two points, the one that minimizes the squared error for those two points; Do this N times and average all the s Rather than: Pick two points; Calculate the squared error for those two points as a function of ; Do this N times, then find the that minimizes the sum of all of the squared errors, as we do with linear regression Are we doing the first thing here or the second thing? Either way there's a simple analytic solution, but I'm not sure which procedure we're doing.
How do you solve for the minimum that produces the least squared error?

Re: Q4) h(x) = ax

Quote:
 Originally Posted by vsuthichai (Post 10637) How do you solve for the minimum that produces the least squared error?
As far as I know, differentiate with respect to , set it to , and solve for .

 vsuthichai 04-29-2013 02:59 AM

Re: Q4) h(x) = ax

Thanks, i just figured that out

 jlevy 04-30-2013 03:55 AM

Re: Q4) h(x) = ax

Quote:
 Originally Posted by geekoftheweek (Post 9081) Is there a best way to minimize the mean-squared error? Thanks
Just use w=inv(X`*X)*X`*Y
and note that X has just a single column (no column of 1's).

 khohi 03-04-2016 07:13 AM

Re: Q4) h(x) = ax

Great :)

حب الشباب

 vnator 03-13-2019 12:08 AM

Re: Q4) h(x) = ax

Without using any calculus, I figured that that the best approximation for g bar(x) would be 0x, seeing as how the average of slopes between all combinations of two random points would end up as 0. In that case, why is the answer for the problem E for none of the above?

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