LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 4 (http://book.caltech.edu/bookforum/forumdisplay.php?f=133)
-   -   questions 5 & 6 (http://book.caltech.edu/bookforum/showthread.php?t=3933)

geekoftheweek 01-31-2013 01:01 PM

questions 5 & 6
 
Once we find an average hypothesis, we have to compute bias=E_x[bias(x)] and var=E_x[var(x)]. In order to compute the expectation values of bias/var wrt x, I assume we need to generate a *new* set of points. Correct? How big should that set be?

geekoftheweek 01-31-2013 02:45 PM

Re: questions 5 & 6
 
...or are we just supposed to use the points generated in order to calculate g_bar? That would mean that bias and var have twice as many points to average over than the number of data sets used to calculate g_bar, because each data set had two two data points.

sanbt 01-31-2013 04:23 PM

Re: questions 5 & 6
 
So to calculate g_bar you used 2 points to get each hypothesis and average over them.

Now Bias and var should come from the entire range of the real line. I would say
about hundreds range from -1 to 1.

geekoftheweek 02-01-2013 11:26 AM

Re: questions 5 & 6
 
Quote:

Originally Posted by sanbt (Post 9095)
Now Bias and var should come from the entire range of the real line. I would say
about hundreds range from -1 to 1.

Are you saying generate 100 new points?

sanbt 02-01-2013 05:57 PM

Re: questions 5 & 6
 
Quote:

Originally Posted by geekoftheweek (Post 9108)
Are you saying generate 100 new points?

yes

gah44 02-01-2013 10:30 PM

Re: questions 5 & 6
 
All these are approximating integrals.

Many problems really are sums, but this one is, theoretically, continuous.

First you do 2D integrals to compute a, a 1D integral to compute bias,
and a 3D integral to compute variance.

(I think it would also work to compute bias+variance in the first place, and subtract bias to get variance, but I didn't try that.)

I used equally space points for all, but you could also use random points.

If I was in the right mood, I might have done Gaussian quadrature, or some other numerical integration method.


All times are GMT -7. The time now is 03:48 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.