View Single Post
  #7  
Old 02-01-2013, 09:24 PM
gah44 gah44 is offline
Invited Guest
 
Join Date: Jul 2012
Location: Seattle, WA
Posts: 153
Default Re: Calculating Average Hypothesis

To help make sure I understood this, I tried to determine the red line for H1 in Example 2.8. That is, the average hypotheses for h(x)=ax+b.

But I get a=0 and b=0, unlike the figure.

I average over a matrix of points, ignoring x1=x2 points.

Anything I should do differently?

I have:

a=(y1-y2)/(x1-x2)
b=(x1*y2-x2*y1)/(x1-x2)

but a averages to zero.
Reply With Quote