View Single Post
Old 02-01-2013, 11:11 AM
yaser's Avatar
yaser yaser is offline
Join Date: Aug 2009
Location: Pasadena, California, USA
Posts: 1,477
Default Re: Calculating Average Hypothesis

Originally Posted by ripande View Post
1. I calculated the value of "a" for which the which minimizes the least square for two points ( x, sin(pi*x) ), x being between -1 and 1.

2. Repeated the above for 100 times and hence got 100 values of "a"
These steps are correct (with ax instead of x in step 1) in calculating the final hypothesis g^{\cal D} for 100 different sets {\cal D}.

3. Then I chose a fresh point x3 between [-1, 1] and calculated the value of y3 = a*x3 for all 100 points
This step evaluates g^{\cal D}(x_3) for each {\cal D} in the 100 runs. If x_3 is fixed for all 100 runs, this step can be used to evaluate the bias and variance at the point x_3 (namely {\bf bias}(x_3) and {\bf var}(x_3)).

4. Calculated average value of y3 for 100 points, say y_avg.
If the 100 points are the same x_3 with different g^{\cal D}, then the average approximates {\bar g}(x_3). If the points are different, I am not sure about the utility of this quantity for the calculation of bias and variance.

5. Calculated "a" for avg hypothesis as : y_avg/x3
You already have the different values of a for different data sets g^{\cal D} (these are the values of a that you used to calculated y_3 from x_3). Because the formula for the hypothesis is linear in a, you can directly calculate a of the average hypothesis by averaging all the a's. What you are suggesting is equivalent in this case.
Where everyone thinks alike, no one thinks very much
Reply With Quote