LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 6

Reply
 
Thread Tools Display Modes
  #11  
Old 05-14-2013, 04:20 AM
Kekeli Kekeli is offline
Junior Member
 
Join Date: Apr 2013
Posts: 6
Default Re: Homework#6 Q3

Thank you for confirming the flow.
Turns out when transforming the test and training set vectors, I was leaving in the bias term, thus x1 and x2 were screwy before creating the polynomial. eep.
Reply With Quote
  #12  
Old 05-14-2013, 07:14 AM
Michael Reach Michael Reach is offline
Senior Member
 
Join Date: Apr 2013
Location: Baltimore, Maryland, USA
Posts: 71
Default Re: Homework#6 Q3

Kekeli, could you explain this? What do you mean by the bias term?
Thanks (I'm still trying to debug my own code.)
Reply With Quote
  #13  
Old 05-16-2013, 03:58 AM
Kekeli Kekeli is offline
Junior Member
 
Join Date: Apr 2013
Posts: 6
Default Re: Homework#6 Q3

Michael, I'm sorry I didn't see this until now.

While testing the file IO, I had inserted 1.0 into the vector of input variables after reading the contents of "in.dta". Then, when doing the nonlinear transformation, I was reading x1 as 1.0, and x2 as x1. Not surprisingly, the linear regression with or without weight decay didn't return the correct estimates for Ein and Eout.

In the end, print statements saved the day. I just wish I'd started in the transformation and not everywhere else in the code.
Reply With Quote
  #14  
Old 03-23-2016, 06:02 AM
khohi khohi is offline
Member
 
Join Date: Dec 2015
Posts: 10
Default Re: Homework#6 Q3

Great job
خلطة بياض الثلج
Reply With Quote
Reply

Thread Tools
Display Modes

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 Jump


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


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.