Name

LOOCV — Calculates Leave One Out Cross-validation for given kriging model.

Calling Sequence

   
   E=LOOCV(model);
   [E, R2]=LOOCV(model);
   [E, R2, mY]=LOOCV(model);
   [E, R2, mY, vy]=LOOCV(model);
   
   [E, R2, mY, vy, Yx]=LOOCV(model,X);
   [E, R2, mY, vy, Yx, vYx]=LOOCV(model,X);
   
   
   

Parameters

model:

kriging model, mlist of type kmodel created previously.

X:

optional parameter. matrix of points (m*n), m - number of points, n - number of dimensions. If X is given, function will calculates Yx and vYx (predicted mean and predicted variance at every point in X for each of m kriging models, that has been constructed without point i).

E:

relative RMSE of cross-validation, scalar.

R2:

R square of cross-validation, scalar.

mY:

Kriging prediction at every design point that has not been used for model construction, column vector (m*1);

vy:

estimated SK variance at every design point that has not been used for model construction, column vector (m*1);

Yx:

if X (m*n) is given, Yx is matrix (m,m), where Yx(j,i) is predicted mean for point X(j,:) using kriging model with i-th point not used for model construction. %nan otherwise.

vYx:

if X (m*n) is given, vYx is matrix (m,m), where vYx(j,i) is estimated SK variance mean for point X(j,:) using kriging model with i-th point not used for model construction.%nan otherwise.

Description

Calculates Leave One Out Cross-validation for given kriging model. It uses estimated model.theta, Beta_kriging, model.sigma, model.noise and model.coefcov and does not reestimate these parameters.

Note: This function uses global variables T_kriging R_kriging Beta_kriging Y_kriging S_kriging F_kriging.

Comment: Calculates the inverse of R_kriging.

Examples

// 2D example
// unknown parameters

function [f]=cmb_2(x)
x1=x(:,1);x2=x(:,2);
f=(4-2.1*x1.*x1+(x1^4)/3).*x1.*x1+x1.*x2+(-4+4*x2.*x2).*x2.*x2
endfunction


x_bound=[-1 -1; 1 1];//for 2- hump Camel back function

ftest=cmb_2;
X=RLHS(10,2,x_bound(1,:),x_bound(2,:));
YExp=ftest(X);

noise=0;theta=[1 1];
[kmodel] =km(X,YExp,0,'gaussian',theta,noise);// creates kriging model

lob   = [0.1]*ones(1,2);upb   = [10]*ones(1,2);
[kmodel p]=findTheta(kmodel,lob,upb,'MLL','RS',200);// searches for optimal thetas, sigma and noise
[E,R]=LOOCV(kmodel);
printf("Rel. RMSE of Cross Validation: %f;  Rsquare: %f;\n",E,R);



   

See also

km, logLL, findTheta, SimulateGaussian, SimCondGaussian

Authors

Janis Janusevskis, 3MI/EMSE

Bibliography