![]() |
#1
|
|||
|
|||
![]()
I guess this question has been asked before, but I am not very clear on it.
I understand calculating the average hypothesis of a constant i.e. taking average of the constant values of differnet hypothesis. But what does calculating average hypothesis of a hypothesis set which consists of lines in y= mx+c mean? How is it calculated ? |
#2
|
|||
|
|||
![]()
I read the earlier post on this question once again. The concept is clear to me now
|
#3
|
|||
|
|||
![]()
I wanted to validate that what I have understood is correct.
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" 3. Then I chose a fresh point x3 between [-1, 1] and calculated the value of y3 = a*x3 for all 100 points 4. Calculated average value of y3 for 100 points, say y_avg. 5. Calculated "a" for avg hypothesis as : y_avg/x3 Is my method of calculating avg hypothesis correct ? Iam not very confident of the answer I am getting |
#4
|
||||
|
||||
![]() Quote:
![]() ![]() ![]() ![]() Quote:
![]() ![]() ![]() ![]() ![]() ![]() Quote:
![]() ![]() ![]() Quote:
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
__________________
Where everyone thinks alike, no one thinks very much |
#5
|
|||
|
|||
![]()
Thanks Prof Yaser for the clarification.
So, if understand correctly,since the hypothesis is linear in "a", I can directly take the average of the value "a" in all hypothesis to calculate the average hypothesis; and what I was doing was just equivalent to it. What should be done in a hypothetical case where the value had not been linear in the hypothesis set? |
#6
|
||||
|
||||
![]() Quote:
Quote:
![]() ![]()
__________________
Where everyone thinks alike, no one thinks very much |
#7
|
|||
|
|||
![]()
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. |
#8
|
|||
|
|||
![]()
OK, I was summing the wrong variable.
It works now. a=0.82 b=0 as it looks on the graph. Now see if I can get the bias and variance for the graph. |
![]() |
Thread Tools | |
Display Modes | |
|
|