LFD Book Forum  

Go Back   LFD Book Forum > Book Feedback - Learning From Data > Chapter 2 - Training versus Testing

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 08-06-2012, 09:32 AM
magdon's Avatar
magdon magdon is offline
RPI
 
Join Date: Aug 2009
Location: Troy, NY, USA.
Posts: 595
Default Re: bias and variance - definition of g bar

All the numbers you mention below are approximately correct. You can now explicitly compute bias(x) and var(x) in terms of x, mean(a), mean(b), var(a) and var(b) (mean(b)=0):

bias(x)=(\sin(\pi x)-mean(a)x-mean(b))^2

var(x)=E_{a,b}\left[( (a-mean(a))x+b-mean(b))^2\right]

Bias is the average of bias(x) over x; var is the average of var(x) over x. Set mean(b)=0. One can show that

bias=\frac{1}{2}+\frac{mean(a)^2}{3}-\frac{2mean(a)}{\pi}

var=\frac{var(a)}{3}+var(b)

Note: you can also compute the bias and variance via simulation.

Quote:
Originally Posted by the cyclist View Post
I am struggling to replicate the variance of H_1 of Ex. 2.8 in the text. I was able to get the bias correct (and both bias and variance for H_0), as well as getting the related quiz problem correct, so this is really puzzling me.

I'm trying to narrow down where my mistake might be. Can someone please verify whether or not the correct average hypothesis is

g_bar(x) = a_mean * x + b_mean

where

a_mean ~= 0.776

and

b_mean ~= 0.

I plot that, and it does look like the figure in the book.

Also, when I take the standard deviation (over the data sets) of the coefficients a and b, I get

std(a) ~= 1.52
std(b) ~= 0.96

Do those look right? I am truly puzzled here!
__________________
Have faith in probability
Reply With Quote
 

Thread Tools
Display Modes

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 Jump


All times are GMT -7. The time now is 07:11 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.