Linear Regression Classification HW2 Q5/6
Hello, I am having trouble understanding the procedure for binary classification using linear regression.
For ordinary linear regression, as I understand it, we may compute the weights by taking the product pseudoinverse matrix and the yvector. In 2D, the line obtained by linear regression is then y = w0 + w1 * x. Now for the binary case, instead of using the actual ycoordinate value of a data point, we use its binary classification relative to the target function. In this case, the only difference would be that the yvector which is to be multiplied by the pseudoinverse matrix consists only of +1 and 1 values. However, when I try this I get an hypothesis line nearly perpendicular to the target function. Could someone please clarify? Thanks 
Re: Linear Regression Classification HW2 Q5/6
On further investigation. I now think that the yvector should be the vector whose elements are sign(wf[0] + wf[1] * x) where the target function is y = wf[0] + wf[1] * x. I now have an E_in of about 0.13.

Re: Linear Regression Classification HW2 Q5/6
I get average E_in as ~ 0.13, however the answer is shown as [Answer edited out by admin].
What I have done:
What have I done wrong? 
Re: Linear Regression Classification HW2 Q5/6
Quote:
BTW, if you want to discuss specific answers (chosen or excluded), you need to do so in a thread whose title starts with the warning *ANSWER* per the announcement above. 
Re: Linear Regression Classification HW2 Q5/6
Sorry for posting the answer in the comment.
I had a bug in the target function which was causing erroneous partitioning. Once I fixed it, things started working as expected. Thank you! :) 
All times are GMT 7. The time now is 08:24 AM. 
Powered by vBulletin® Version 3.8.3
Copyright ©2000  2020, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. AbuMostafa, Malik MagdonIsmail, and HsuanTien Lin, and participants in the Learning From Data MOOC by Yaser S. AbuMostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.