LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 4 (http://book.caltech.edu/bookforum/forumdisplay.php?f=133)
-   -   Online homework 4, question 4 (http://book.caltech.edu/bookforum/showthread.php?t=4425)

Tobias 09-28-2013 08:36 AM

Online homework 4, question 4
 
Hi there.

I have some understanding how to find g-bar(x). After a lot of tries, I have got to the following solution, but I am far from sure it is valid.
g-bar(x) must be the h(x)=ax, which minimizes the expected squared error for any point, i.e. the expected value of http://www.wolframalpha.com/share/im...3GMNZTGNRQaaaa. Since x is uniformly distributed this is the same as minimizing http://www.wolframalpha.com/share/im...3DANZTHA2Qaaaa, which yields a=3/pi =0.955

To this I have a few questions
  1. Am I correct
  2. Does g-bar depend on the size of the sample?
  3. Is there a general approach to find g-bar?

yaser 09-28-2013 09:11 PM

Re: Online homework 4, question 4
 
Quote:

Originally Posted by Tobias (Post 11515)
Hi there.

I have some understanding how to find g-bar(x). After a lot of tries, I have got to the following solution, but I am far from sure it is valid.
g-bar(x) must be the h(x)=ax, which minimizes the expected squared error for any point, i.e. the expected value of http://www.wolframalpha.com/share/im...3GMNZTGNRQaaaa. Since x is uniformly distributed this is the same as minimizing http://www.wolframalpha.com/share/im...3DANZTHA2Qaaaa, which yields a=3/pi =0.955

To this I have a few questions
  1. Am I correct
  2. Does g-bar depend on the size of the sample?
  3. Is there a general approach to find g-bar?

Close. What you have calculated is the best approximation of the target using the model, but it is based on knowing the entire target function. If you assume you know only two points at a time (the data set given in the example), then you should fit the two points with a line then get the average of those lines as you vary the two points. You will get something close, but not identical, to the slope you got.

This answers your second question in the affirmative as well. Doing this exercise with two points at a time is not the same as with three points at a time so \bar g does depend on the size of the training set in general.

The general approach to finding \bar g is exactly following the definition. In integral form, it will be a double integral if the data set has two points, triple integral if it has three points etc., but in general it is done with Monte Carlo so no actual integration is needed.


All times are GMT -7. The time now is 07:44 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, 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.