No BSD License  

Highlights from
Bootstrap prediction error rate

image thumbnail

Bootstrap prediction error rate



15 Apr 2007 (Updated )

(Application of BSTRAP)

function[res] = bpredfun1(zest,zval)
% BPREDERR helper function, passed to BSTATS.Inputs estimation and
% validation samples, each in a matrix of form z = [y x], computes
% OLS estimates for the estimation sample, and  calculates average
% squared prediction error for the validation sample.
% EXAMPLE <none> (Oh, the FEX code metrics..)  

yest = zest(:,1); xest = zest(:,2:end);
yval = zval(:,1); xval = zval(:,2:end);

best = regress(yest,xest);   
eval = yval - xval*best;    
res.b = best;
res.e = mean(eval.^2);

Contact us