LFD Book Forum Questions 1-4: Clarification
 Register FAQ Calendar Mark Forums Read

#1
05-18-2013, 01:20 PM
 Kekeli Junior Member Join Date: Apr 2013 Posts: 6
Questions 1-4: Clarification

No regularization, just linear regression with transformed input variables...
So the models k=3..7 correspond to

etc.?
#2
05-18-2013, 01:42 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: Questions 1-4: Clarification

Quote:
 Originally Posted by Kekeli So the models k=3..7 correspond to etc.?
The transformed space in the case of would be

The model (hypothesis set) would be a linear combination of these coordinates,

__________________
Where everyone thinks alike, no one thinks very much
#3
05-18-2013, 02:09 PM
 Kekeli Junior Member Join Date: Apr 2013 Posts: 6
Re: Questions 1-4: Clarification

thank you!
for Q1&Q2, for each model, train with the 1st 25 points and, using the weights, eval Ein with the last 10 points, and Eout with the out.dta points...
for Q3&Q4, rinse/repeat with a different split for training and validation data

[p.s., really enjoying the course, and appreciate your time and consideration in the forum!]
#4
05-18-2013, 06:53 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: Questions 1-4: Clarification

Quote:
 Originally Posted by Kekeli for Q1&Q2, for each model, train with the 1st 25 points and, using the weights, eval Ein with the last 10 points, and Eout with the out.dta points
Correct, except that it is with the last 10 points.
__________________
Where everyone thinks alike, no one thinks very much
#5
05-20-2013, 07:01 AM
 jlaurentum Member Join Date: Apr 2013 Location: Venezuela Posts: 41
Re: Questions 1-4: Clarification

Hello:

I'm having some doubts with these questions as well. For questions 1 and 2, I trained on the first 25 samples of in.dta, validated on the last 10 samples of the same data file, and finally evaluated Eout for each of the five models with the 250 samples in out.dta.

The five models are linear regression models with 4 to 7 weigths using the first 4 through all seven nonlinear transformations explained in the question. As before (with homework 6), once a linear model predicts a certain Y value, the sign operation is taken on this sum to see how each point is classified. The classification error is simply the ration of misclassified points in the entire test/validation data set.

I know I must be doing something wrong because when I see question 5, my Eout's are much higher than any of the options given. After all, when you have a 4 to 7 parameter model and you're only training with 10 or 25 samples, you'd expect an outrageous Eout. ... What is the mistake in my procedure?
#6
05-20-2013, 01:00 PM
 jlaurentum Member Join Date: Apr 2013 Location: Venezuela Posts: 41
Re: Questions 1-4: Clarification

I made a stupid programming error in my code. As I was generating the predictions for each model on the test/validation data sets, I was comparing that output to the wrong "Y" variable. Once corrected, the out of sample errors of questions 2 and 4 are within the options given in question 5.

To those who may be struggling with these questions,
• Remeber that in questions 1 and 2 you train with the first 25 samples of "in.dta" and validate with the last 10 samples. For questions 3 and 4 you do the opposite: train with the last 10 samples and validate with the first 25.
• When you calculate the validation and test set errors, remember to compare each model's output with the correct Y's.

 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 04:43 AM.