 LFD Book Forum Calculating The "Average" Function Of Xn

#1
 munchkin Member Join Date: Jul 2012 Posts: 38 Calculating The "Average" Function Of Xn

Page 63 seems to be saying this:

For each data set, evaluate the hypothesis for that data and save it somewhere. When all of the data has been processed take each data point and calculate the "average" value of that data point evaluated against each of the previously generated hypotheses. That average value can be used to calculate the variance of the data set.

So this is just a straightforward averaging calculation, is it not? I'm having some difficulty duplicating the variance values shown in the examples from the book and suspect that this calculation may be the source of the problem.

#2 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477 Re: Calculating The "Average" Function Of Xn

Quote:
 Originally Posted by munchkin For each data set, evaluate the hypothesis for that data and save it somewhere. When all of the data has been processed take each data point and calculate the "average" value of that data point evaluated against each of the previously generated hypotheses. That average value can be used to calculate the variance of the data set.
Just to clarify. After you have calculated the various hypotheses based on different data sets, you evaluate these hypotheses on a generic point (not necessarily belonging to any data set used for training). The average value you get will be and the variance in the values you get will be . The expected value of with respect to (based on the uniform probability of generating ) is the variance . Is this what you have calculated?
__________________
Where everyone thinks alike, no one thinks very much
#3
 munchkin Member Join Date: Jul 2012 Posts: 38 Re: Calculating The "Average" Function Of Xn

Thanks for your quick reply. I have managed to duplicate the variance result for hypothesis zero of example 2.8. The error had nothing to do with averaging. I don't use a generic x but simply calculate the average of all of the g's generated by the test data sets. This averaged g is evaluated at each data point where comparison with g(x) is required. It seems to work for the constant value case.

The book says that the average g is calculated for "a particular x" and is interpreted as the expected value of the random variable gbar(X). Is this particular x value the "generic" value?
#4 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477 Re: Calculating The "Average" Function Of Xn

Quote:
 Originally Posted by munchkin The book says that the average g is calculated for "a particular x" and is interpreted as the expected value of the random variable gbar(X). Is this particular x value the "generic" value?
Correct. This is just to simplify the concept, but your approach of getting the whole at once is certainly valid.
__________________
Where everyone thinks alike, no one thinks very much

 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 08:44 AM. 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.