# 1. Sampling the Space of Parameters¶

## 1.1. Design of Experiments¶

Whatever method is used, the first step consists in defining how we are going to modify input variables to retrieve the evolution of the response surface. This is called a Design of Experiments (DoE) as defined by [Sacks1989]. The parameter space is called a `Space`

:

```
space = batman.space.Space([[1, 1], [3, 3]])
space.sampling(10, 'halton')
space.write('.')
```

The quality of the DoE is paramount as it determines the physics that will be observed. If the space is not filled properly, homogeneously, we can bias our analysis and retrieve only a particular behaviour of the physic. This concept has been extensively been used in experiments, especially the one-at-a-time design, which consists of only changing only one parameter at a time. Doing so, the space is not filled properly and only simple behaviours can be recovered. In order to assess the quality of the sampling, the discrepancy is usually used. It is an indicator of the distance between the points within the parameters space. The lower the discrepancy is, the better the design is. This information can be used to optimize a DoE Among all formulations of this criterion, the centered discrepancy is the most robust one [Damblin2013]. This information can be computed from the space:

```
space.discrepancy()
```

As stated before, the golden standard would be to perform a *Monte Carlo* sampling but it would require a huge sampling which is unfeasible with costly numerical simulations. Therefore are found random (or quasi-random) sampling methods. Low discrepancy sequence has been designed to overcome this issue. These designs are built upon a pattern, a sequence, depending on factors such as prime numbers. This allows a fast generation of sampling space with good properties. A well-known method is the Latin Hypercube Sampling (LHS). The idea behind is to discretize the space to get a regular grid and sample randomly a point per zone.

In Damblin et al. [Damblin2013] a comprehensive analysis of most common DOE is found. In the end, the *Sobol’* or *Halton* DOE are sufficient when dealing with a small number of parameters (<5). With an increasing number of parameters, patterns start to appear and optimized LHS are required.

## 1.2. Resampling the parameters space¶

There are several methods for refining, resampling, the parameter space. In [Scheidt], the classical methods are reviewed and a framework combining several methods is proposed. In [Roy2017], we added some methods that peforme better in high dimentionnal cases. In BATMAN, the following methods are available:

Variance (), As stated in Surrogate, one of the main advantages of Gaussian processes over other surrogates is to provide an insight into the variance of the solution. The first method consists in using this data and weight it with the eigenvalues of the POD:

Global optimization on this indicator gives the new point to simulate.

Leave-One-Out (LOO) and , A LOO is performed on the POD and highlights the point where the model is the most sensitive. The strategy here is to add a new point around it. Within this hypercube, a global optimization over is conduced giving the new point.

LOO-

*Sobol’*, Using the same steps as with the LOO - method, the hypercube around the point is here truncated using prior information about*Sobol’*indices-see UQ. It requires that indices be close to convergence not to bias the result. Or the bias can be intentional depending on the insight we have about the case.Extrema, This method will add 4 points. First, it look for the point in the sample which has the min value of the QoI. Within an hypercube, it add the minimal and maximal predicted values. Then it do the same for the point of the sample which has the max value of the QoI. This method allows to capture the gradient around extrem values.

Hybrid, This last method consists of a navigator composed by any combination of the previous methods.

Discrepancy. Simply add a point that minimize the discrepancy.

It is fairly easy to resample the parameter space. From a space and a surrogate:

```
new_point = space.refine(surrogate)
```

### 1.2.1. Hypercube¶

The hypercube is defined by the cartesian product of the intervals of the parameters *i.e.* . The constrained optimization problem can hence be written as:

Moreover, a maximum cube-volume aspect ratio is defined in order to preserve the locality. This gives the new constrain

with is set arbitrarily to prevent too elongated hypercubes. The global optimum is found using a two-step strategy: first, a discrete optimization using gives an initial solution; second a basin-hopping algorithm finds the optimum coordinates of the hypercube. In case of the LOO-*Sobol’* method, the hypercube is truncated using the total order *Sobol’* indices.

## 1.3. Efficient Global Optimization (EGO)¶

In the case of a surrogate model based on a gaussian process, Efficient Global Optimization (EGO) [Jones1998] algorithm can be used to resample the parameter space in directive to an optimization. It comprises as a tradeoff between the actual minimal value and an expected value given by the standard error for a given prediction . The expected improvement is defined as:

with the standard normal density and distribution function. Using the fact that this quantify is monotonic in and , it reduces to the probability of improvement: