LFD Book Forum Q4) h(x) = ax
 Register FAQ Calendar Mark Forums Read

#21
04-28-2013, 04:13 PM
 Moobb Junior Member Join Date: Apr 2013 Posts: 9
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!!
Thanks for the answer, somehow I was thick enough not to see what was right in front of me..
#22
04-29-2013, 02:10 AM
 vsuthichai Junior Member Join Date: Jan 2013 Posts: 3
Re: Q4) h(x) = ax

Quote:
 Originally Posted by Anne Paulson 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?
#23
04-29-2013, 02:37 AM
 Ziad Hatahet Member Join Date: Apr 2013 Location: San Francisco, CA Posts: 23
Re: Q4) h(x) = ax

Quote:
 Originally Posted by vsuthichai 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 .
#24
04-29-2013, 02:59 AM
 vsuthichai Junior Member Join Date: Jan 2013 Posts: 3
Re: Q4) h(x) = ax

Thanks, i just figured that out
#25
04-30-2013, 03:55 AM
 jlevy Junior Member Join Date: Apr 2013 Posts: 5
Re: Q4) h(x) = ax

Quote:
 Originally Posted by geekoftheweek 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).
__________________
Joe Levy
[URL="https://trustmeimastatistician.wordpress.com/"]Trust me, I'm a statistician[/URL]
#26
03-04-2016, 07:13 AM
 khohi Member Join Date: Dec 2015 Posts: 10
Re: Q4) h(x) = ax

Great

حب الشباب
#27
03-13-2019, 12:08 AM
 vnator Junior Member Join Date: Mar 2019 Posts: 1
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?

 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 09:30 AM.