IMSE

IMSPE(model, theta=None, Lambda=None, mult=None, covtype=None, nu=None, eps=np.float64(1.4901161193847656e-08))[source]

IMSPE of a given design.

Integrated Mean Square Prediction Error

Parameters:
  • X (hetgpy.hetGP.hetGP or hetgpy.homGP.homGP model.) – Alternatively, one can provide a matrix of unique designs considered

  • theta (ndarray_like) – lengthscales

  • Lambda (ndarray_like) – diagonal matrix for the noise

  • mult (ndarray_like) – number of replicates at each design

  • covtype (str) – either “Gaussian”, “Matern3_2” or “Matern5_2”

  • nu (float) – variance parameter

  • eps (float) – numerical nugget

  • Details

  • -------

  • homGP (One can provide directly a model of class hetGP or)

  • arguments (or provide design locations X and all other)

Wij(mu1, mu2=None, theta=None, type='Gaussian')[source]

Compute double integral of the covariance kernel over a [0,1]^d domain

Parameters:
  • mu1 (ndarray)like) – input locations considered

  • mu2 (ndarray)like) – input locations considered

  • theta (ndarray_like) – lengthscale hyperparameter of the kernel

  • type (str) – kernel type, one of "Gaussian", "Matern5_2" or "Matern3_2"

References

M. Binois, J. Huang, R. B. Gramacy, M. Ludkovski (2019), Replication or exploration? Sequential design for stochastic simulation experiments, Technometrics, 61(1), 7-23. Preprint available on arXiv:1710.03206.

allocate_mult(model=None, N=None, Wijs=None, use_Ki=False)[source]

Allocation of replicates on existing design locations, based on (29) from (Ankenman et al, 2010)

Parameters:
  • model (hetGP model) – hetGP model

  • N (int) – total budget of replication to allocate

  • Wijs (ndarray) – optional previously computed matrix of Wijs, see hetgpy.IMSE.Wij

  • use_Ki (bool) – should Ki from model be used?

Return type:

vector with approximated best number of replicates per design

References

  1. Ankenman, B. Nelson, J. Staum (2010), Stochastic kriging for simulation metamodeling, Operations research, pp. 371–382, 58

deriv_crit_IMSPE(x, model, id=None, Wijs=None)[source]

Derivative of crit_IMSPE

Parameters:
  • x (ndarray_like) – matrix for the news design (size 1 x d)

  • model (hetGP or homGP) – model

  • id (None) – None (but included for compatibility with crit_IMSPE input structure so it can be used in minimize)

  • Wijs (ndarray_like) – optional previously computed matrix of Wijs, see Wij

Return type:

Derivative of the sequential IMSPE with respect to x

horizon(model, current_horizon=None, previous_ratio=None, target=None, Wijs=None, seed=None)[source]

Adapt the look-ahead horizon depending on the replicate allocation or a target ratio

Parameters:
  • model (hetGP or homGP model) – hetGP or homGP model

  • current_horizon (int) – horizon used for the previous iteration, see details

  • previous_ratio (float) – ratio before adding the previous new design

  • target (float) – scalar in [0,1] for desired n/N

  • Wijs (nd_array) – optional previously computed matrix of Wijs, see hetgpy.IMSE.Wij

Returns:

  • Randomly selected horizon for next iteration (adpative) if no target is provided,

  • otherwise returns the update horizon value.

  • Details

  • ——-

  • If target is provided, along with previous_ratio and current_horizon

  • itemize{ – item the horizon is increased by one if more replicates are needed but a new ppint has been added at the previous iteration, item the horizon is decreased by one if new points are needed but a replicate has been added at the previous iteration, item otherwise it is unchanged.

  • }

  • If no target is provided, allocate_mult is used to obtain the best allocation of the existing replicates,

  • then the new horizon is sampled from the difference between the actual allocation and the best one, bounded below by 0.

  • See (Binois et al. 2017).

References

M. Binois, J. Huang, R. B. Gramacy, M. Ludkovski (2019), Replication or exploration? Sequential design for stochastic simulation experiments, Technometrics, 61(1), 7-23.cr Preprint available on arXiv:1710.03206.

lhs_EP(m, seed=None)[source]

From DiceDesign: FUNCTION PERFORMING ELEMENTARY PERMUTATION (EP) IN LHD USED IN SA ALGORITHMS

Parameters:

m (nd_arraylike) – the design

Returns:

out – list including design after EP, ligns and columns defining EP

Return type:

tuple

maximinSA_LHS(design, T0=10, c=0.95, it=2000, p=50, profile='GEOM', Imax=100, seed=None)[source]

Implementation of maximinSA_LHS from DiceDesign Only profile=”GEOM” is implemented (like in hetGP)

#####maximinSA_LHS##### #####Maximin LHS VIA SIMULATED ANNEALING OPTIMIZATION#####

#—————————————————————————| #args : m : the design | # T0 : the initial temperature | # c : parameter regulating the temperature | # it : the number of iterations | # p : power required in phiP criterion | # profile : temperature down profile | # “GEOM” or “GEOM_MORRIS” or “LINEAR”. By default : “GEOM” | #output : a list containing all the input arguments plus: | # a mindist optimized design | # vector of criterion values along the iterations | # vector of temperature values along the iterations | # vector of acceptation probability values along the iterations | #depends : phiP,lhs_EP | #—————————————————————————|

mi(mu1, theta, type)[source]

Compute integral of the covariance kernel over a [0,1]^d domain

Parameters:
  • mu1 (ndarray_like) – input locations considered

  • theta (ndarray_like) – lengthscale hyperparameter of the kernel

  • type (str) – kernel type, one of "Gaussian", "Matern5_2" or "Matern3_2"

References

Replication or exploration? Sequential design for stochastic simulation experiments, Technometrics, 61(1), 7-23. Preprint available on arXiv:1710.03206.

phiP(design, p=50)[source]

Implementation of phiP.R from DiceDesign (necessary for maximinSA_LHS from DiceDesign which is used by IMSPE_search)

From DiceDesign: Compute the phiP criterion (Lp norm of the sum of the inverses of the design inter-point distances) Reference: Pronzato, L. and Muller, W.,2012, Design of computer experiments: space filling and beyond, Statistics and Computing, 22:681-701. A higher phiP corresponds to a more regular scaterring of design points

Parameters:
  • design (nd_arraylike) – design for a computer experiment

  • p (int) – the “p” in the Lp norm which is taken (default=50)

Returns:

fi_p – the phiP criterion

Return type:

np.float