View Single Post
Old 10-18-2015, 10:53 PM
yaser's Avatar
yaser yaser is offline
Join Date: Aug 2009
Location: Pasadena, California, USA
Posts: 1,478
Default Re: Linear Regression Classification HW2 Q5/6

Originally Posted by sandeeps View Post
I get average E_in as ~ 0.13, however the answer is shown as [Answer edited out by admin].
What I have done:
  • Generated a random line (target function)
  • Generated 100 random points; xn
  • Computed yn using target function
  • Computed w using the linear regression equation
  • Computed Ein = mean(h(x) != yn) i.e. number of values incorrectly estimated by w
  • Repeated the above steps 1000 times and averaged Ein

What have I done wrong?
The steps seem fine. Can you visually check if the hypothesis line makes sense in a few of the runs?

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.
Where everyone thinks alike, no one thinks very much
Reply With Quote