ForK Library

Subroutine used to determine the maximum Variance from a Kriging response surface (requires buildkriging to be called first)
Only Works for Ordinary Kriging (Constant Mean function)
More...
Go to the source code of this file.
Functions/Subroutines  
subroutine  krigingmaxvariancepredict (ndim, ntot, X, stot, H, beta, V, hyper, Xm, Sm, covarflagi, optflag, Lb, Ub) 
This subroutine predicts the global maximum variance value from the Kriging surface (constructed using buildkriging). Using an existing Kriging surface, the maximum variance from the model is determined using either simplexsearch or patternsearch (specified with the optflagi). Within these optimization subroutines, the code krigingfuncvariance is invoked to predict the variance of the Kriging surface at a particular location. The optimization algorithms by design determine the minimum value of a function. To determine the maximum value the objective is multiplied by \(1\) and minimization is performed. This optimization can only be performed on an Ordinary Kriging surface, meaning that the mean function is a constant value that is fitted during the construction of the mean function. From the universal Kriging framework used in buildkriging, ordinary Kriging can be recovered by using a \(p=0\) regression. This zeroth order regression requires a single term (meaning \(stot=1\)) and all the elements of the collocation matrix (H) are equal to one. 
Subroutine used to determine the maximum Variance from a Kriging response surface (requires buildkriging to be called first)
Only Works for Ordinary Kriging (Constant Mean function)
Definition in file krigingmaxvariancepredict.f90.
subroutine krigingmaxvariancepredict  (  integer,intent(in)  ndim, 
integer,intent(in)  ntot,  
real(8),dimension(ndim,ntot),intent(in)  X,  
integer,intent(in)  stot,  
real(8),dimension(stot,ntot),intent(in)  H,  
real(8),dimension(stot),intent(in)  Beta,  
real(8),dimension(ntot),intent(in)  V,  
real(8),dimension(ndim+2),intent(in)  hyper,  
real(8),dimension(ndim),intent(out)  Xm,  
real(8),intent(out)  Sm,  
integer,intent(in)  covarflagi,  
integer,intent(in)  optflag,  
real(8),dimension(ndim),intent(in)  Lb,  
real(8),dimension(ndim),intent(in)  Ub  
) 
This subroutine predicts the global maximum variance value from the Kriging surface (constructed using buildkriging). Using an existing Kriging surface, the maximum variance from the model is determined using either simplexsearch or patternsearch (specified with the optflagi). Within these optimization subroutines, the code krigingfuncvariance is invoked to predict the variance of the Kriging surface at a particular location. The optimization algorithms by design determine the minimum value of a function. To determine the maximum value the objective is multiplied by \(1\) and minimization is performed.
This optimization can only be performed on an Ordinary Kriging surface, meaning that the mean function is a constant value that is fitted during the construction of the mean function. From the universal Kriging framework used in buildkriging, ordinary Kriging can be recovered by using a \(p=0\) regression. This zeroth order regression requires a single term (meaning \(stot=1\)) and all the elements of the collocation matrix (H) are equal to one.
The maximum variance of a Kriging surface is a useful quantity when determining where additional function evaluations should be added to improve the predictions from the Kriging model. A large variance in a particular location indicates that the predictions from the Kriging model in that location have a large degree of uncertainty associated with them. Placing additional sample points in areas of large variance will improve the precision of the Kriging predictions.
in)  ndim : The dimension of the problem 
in)  ntot : The number of Training points 
in)  X : The location of the training points (size=[ndimxntot]) 
in)  stot : Number of Terms in the regression 
in)  H: The collocation matrix for the regression (size=[stotxntot]) 
in)  beta: Regression coefficients based on the optimal estimate for the Kriging model (size=[stot]) Supplied by buildkriging subroutine 
in)  V: Processed Training Data (size=[ntot]) Supplied by buildkriging subroutine 
in)  hyper: Hyperparameters for the Kriging Model (size=[ndim+2]) Supplied by buildkriging subroutine 
out)  Xm : Location of the maximum variance (size=[ndim]) 
out)  Sm : Maximum Variance value 
in)  covarflagi: Flag to govern which covariance function is used

in)  optflagi: Flag to govern the optimization algorithm used to determine maximum variance

in)  Lb Lower Bound for each variable (size = [ndim]) Should be the minimum possible value of Xm in each dimension 
in)  Ub Upper Bound for each variable (size = [ndim]) Should be the maximum possible value of Xm in each dimension 
Definition at line 55 of file krigingmaxvariancepredict.f90.
References patternsearch(), and simplexsearch().