 LFD Book Forum Linear Regression

#1
 samirbajaj Member Join Date: Jul 2012 Location: Silicon Valley Posts: 48 Linear Regression

Greetings!

A couple of questions regarding programming problems #6 and #7:

1) Re: problem 6: When computing E_out using results from the earlier exercise, do we take the result of just one iteration from that previous experiment, or the average of 1000 runs (i.e., the average parameter values)? I'm getting VASTLY different answers, depending on what I choose...please advise!

2) Re: problem 7: Am I to simply use the weights from #5 and plug them into the hw1 PLA code without modification? (I assume so, but wanted to be certain.)

Thanks.

-Samir
#2 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477 Re: Linear Regression

Quote:
 Originally Posted by samirbajaj 1) Re: problem 6: When computing E_out using results from the earlier exercise, do we take the result of just one iteration from that previous experiment, or the average of 1000 runs (i.e., the average parameter values)? I'm getting VASTLY different answers, depending on what I choose...please advise!
The average of 1000 runs.

Quote:
 2) Re: problem 7: Am I to simply use the weights from #5 and plug them into the hw1 PLA code without modification? (I assume so, but wanted to be certain.
Correct.
__________________
Where everyone thinks alike, no one thinks very much
#3
 nedqlko.m Junior Member Join Date: Jul 2012 Posts: 7 Re: Linear Regression

I am a bit confused about Question #5. I have got a vector of E_in whose length is equal to the number of examples. Is this supposed to be so? And if yes, how do I then check my answer after 1000 runs - do I take the mean of the N (number of example) E_in values, or I am supposed to get a single value for E_in per each run?

Thanks very much in advance! Any help would be greatly appreciated!
#4
 samirbajaj Member Join Date: Jul 2012 Location: Silicon Valley Posts: 48 Re: Linear Regression

Quote:
 Originally Posted by nedqlko.m I am a bit confused about Question #5. I have got a vector of E_in whose length is equal to the number of examples. Is this supposed to be so? And if yes, how do I then check my answer after 1000 runs - do I take the mean of the N (number of example) E_in values, or I am supposed to get a single value for E_in per each run?
E_in is the fraction of points that were classified incorrectly. You are to run your experiment 1,000 times, determine the E_in each time, and take the mean of all those results.

Hope that helps.

-Samir
#5
 nedqlko.m Junior Member Join Date: Jul 2012 Posts: 7 Re: Linear Regression

Quote:
 Originally Posted by samirbajaj E_in is the fraction of points that were classified incorrectly. You are to run your experiment 1,000 times, determine the E_in each time, and take the mean of all those results. Hope that helps. -Samir
Thanks very much for your reply! This does make sense, and I've just realised why I was initially confused about this - I always try to write my code to be as efficient as possible, and I was calculating this in a vectorised way (that's why I mentioned above that I've got a vector of values and not a single value) but in this particular case I had forgotten to sum up all elements of the vector.

 Tags linear regression 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 05:26 AM.