Thread: Q4) h(x) = ax
View Single Post
  #6  
Old 01-31-2013, 03:34 PM
sanbt sanbt is offline
Member
 
Join Date: Jan 2013
Posts: 35
Default Re: Q4) h(x) = ax

Quote:
Originally Posted by geekoftheweek View Post
Never mind, I got my solution to converge, though I do not trust my answer. Oh well.
You can use linear regression to calculate each hypothesis.
(since linear regression is basically analytical formula for minimizing mean square error).

Also, you can confirm if your g_bar from simulation makes sense by calculate it directly. (calculate expectation of the hypothesis from each (x1,x2) over [-1,1] x [-1,1] ). This involves two integrals but you can plug in the expression to wolfram or mathematica.
Reply With Quote