Quote:
Originally Posted by geekoftheweek
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.