ForK Library

# krigingmaxeipredict.f90 File Reference

Subroutine used to determine the maximum expected improvement from a Kriging response surface based on a current minimum value (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 krigingmaxeipredict (ndim, ntot, X, stot, H, beta, V, hyper, Xm, Eim, covarflagi, optflag, Lb, Ub, Ymin)
This subroutine predicts the global maximum expected improve from the Kriging surface (constructed using buildkriging) for a given minimum value (Ymin). Using an existing Kriging surface, the maximum expected variance from the model is determined using either simplexsearch or patternsearch (specified with the optflagi). Within these optimization subroutines, the expected improvement at a given point is computed using:

## Detailed Description

Subroutine used to determine the maximum expected improvement from a Kriging response surface based on a current minimum value (requires buildkriging to be called first)
Only Works for Ordinary Kriging (Constant Mean function)

Definition in file krigingmaxeipredict.f90.

## Function Documentation

 subroutine krigingmaxeipredict ( 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) Eim, integer,intent(in) covarflagi, integer,intent(in) optflag, real(8),dimension(ndim),intent(in) Lb, real(8),dimension(ndim),intent(in) Ub, real(8),intent(in) Ymin )

This subroutine predicts the global maximum expected improve from the Kriging surface (constructed using buildkriging) for a given minimum value (Ymin). Using an existing Kriging surface, the maximum expected variance from the model is determined using either simplexsearch or patternsearch (specified with the optflagi). Within these optimization subroutines, the expected improvement at a given point is computed using:

$EI(x) = \begin{cases} (y_{min} - y^{*}(x)) \Phi \left( \frac{y_{min}-y^{*}(x)}{s(x)} \right) + s(x) \phi \left( \frac{y_{min}-y^{*}(x)}{s(x)} \right) & \text{if s(x)>0,} \\ 0 & \text{if s(x)=0} \end{cases}$

where is the probability density function and is the cummulative distribution function for the Normal distribution. 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 expected improvement value is a useful quantity in the context of optimization. Because the Kriging surface is stochastic, the expected improvement at a particular point is a probabilitic quantity that predicts the expected decrease in the current minimum value if a new function evaluation were performed at that point. Hence, the next function evaluation in the design optimization should be performed at the point of maximum expected improvement to maximum the probability of of encountering a new minimum value.

Date:
May 2, 2012
Parameters:
 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 expected improvement (size=[ndim]) out) Eim : Maximum expected improvement value in) covarflagi: Flag to govern which covariance function is used covarflag==0 Uses Matern function with $$\nu=1/2$$ covarflag==1 Uses Matern function with $$\nu=3/2$$ covarflag==2 Uses Matern function with $$\nu=5/2$$ The parameter $$\nu$$ governs the smoothness and differentiability of the covariance function. For function only Kriging, all three options are available. Good rule of thumb is to use the least smooth ( $$\nu=1/2$$) unless there is a reason to assume more smoothness in the data For small numbers of training points, higher $$\nu$$ can improve accuracy in) optflagi: Flag to govern the optimization algorithm used to determine maximum expected improvement optflag=0 Simplex Search (Nelder-Mead Method) to determine maximum expected improvement Local optimization technique using simplex elements to determine search direction and line search to determine step sizes Fastest method but inherently sequential and may stall on local optimum optflag=1 Pattern Search used to determine maximum expected improvement Global optimization method with fixed search directions (forward and backward in each direction) Each iteration requires $$2*ndim$$ function evaluations; however, these may be performed in parallel using openmp (Each thread performs own likelihood evaluation so OMP_STACK_SIZE must be set large enough) 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 in) Ymin The current minimum value that the new candidate improves on. In the context of optimization, Ymin is the minimum value for the current optimization iteration. The expected improvement at a point uses the mean and variance from the Kriging model to predict the improvement in the minimum value if a new simulation is performed at that location. Hence, the maximum expected improvement is the location in the design space most likely to reduce the minimum value by the largest amount.

Definition at line 65 of file krigingmaxeipredict.f90.

References patternsearch(), and simplexsearch().