where (xt:ggt (xg(xnow consider the random variable (xt for random training set the expectation of its square is ggt (xg(xed (xt (ed(xt )) var (xt ( (eggt (xg( )) var ggt ( { { pointwise squared bias pointwise variance if we view the learner ggt (xas function of random training setthen the pointwise squared bias term is measure for how close ggt (xis on average to the true ( )whereas the pointwise variance term measures the deviation of ggt (xfrom its expected value eggt (xthe squared bias can be reduced by making the class of functions more complex howeverdecreasing the bias by increasing the complexity often leads to an increase in the variance term we are thus seeking learners that provide an optimal balance between the bias and varianceas expressed via minimal generalization risk this is called the bias-variance tradeoff note that the expected generalization risk ( can be written as `+ed (xt )where and are independent it therefore decomposes as `(ggt ` ( [ggt (xxg( )) [var[ggt (xx]{ { expected squared bias pointwise squared bias pointwise variance bias-variance tradeoff ( expected variance estimating risk the most straightforward way to quantify the generalization risk ( is to estimate it via the test loss ( howeverthe generalization risk depends inherently on the training setand so different training sets may yield significantly different estimates moreoverwhen there is limited amount of data availablereserving substantial proportion of the data for testing rather than training may be uneconomical in this section we consider different methods for estimating risk measures which aim to circumvent these difficulties in-sample risk we mentioned thatdue to the phenomenon of overfittingthe training loss of the learner` (gt (for simplicityhere we omit from ggt )is not good estimate of the generalization risk `(gt of the learner one reason for this is that we use the same data for both training the model and assessing its risk how should we then estimate the generalization risk or expected generalization riskto simplify the analysissuppose that we wish to estimate the average accuracy of the predictions of the learner gt at the feature vectors xn (these are part of the training set tin other wordswe wish to estimate the in-sample risk of the learner gt `in (gt loss(yi gt (xi )) = ( where each response yi is drawn from ( xi )independently even in this simplified settingthe training loss of the learner will be poor estimate of the in-sample risk insteadthe in-sample risk