# multilevel_multifidelity_sampling

Multilevel-Multifidelity sampling methods for UQ

**Specification**

*Alias:*multilevel_multifidelity_mc mlmfmc*Arguments:*None

**Child Keywords:**

Required/Optional |
Description of Group |
Dakota Keyword |
Dakota Keyword Description |
---|---|---|---|

Optional |
Sequence of seed values for multi-stage random sampling |
||

Optional |
Reuses the same seed value for multiple random sampling sets |
||

Optional |
Initial set of samples for multilevel/multifidelity sampling methods. |
||

Optional |
Solution mode for multilevel/multifidelity methods |
||

Optional |
Selection of sampling strategy |
||

Optional |
Enable export of multilevel/multifidelity sample sequences to individual files |
||

Optional |
Stopping criterion based on relative error reduction |
||

Optional |
Number of iterations allowed for optimizers and adaptive UQ methods |
||

Optional |
Stopping criterion based on maximum function evaluations |
||

Optional |
Indicate the type of final statistics to be returned by a UQ method |
||

Optional |
Selection of a random number generator |
||

Optional |
Identifier for model block to be used by a method |

**Description**

An adaptive sampling method that utilizes both multilevel and multifidelity relationships within an ensemble surrogate model in order to improve efficiency through variance reduction.

In the case of a multilevel relationship, multilevel Monte Carlo methods are used to compute an optimal sample allocation per level, and in the case of a multifidelity relationship, control variate Monte Carlo methods are used to compute an optimal sample allocation per fidelity. These two approaches can also be combined, resulting in the multilevel-multifidelity sampling approach below.

*Multilevel Control Variate Monte Carlo*

If both multilevel and multifidelity structure are included within an ensemble model specification, then an inner control variate can be applied across two model fidelities for each level within an outer multilevel approach.

On each level, a control variate is active for the discrepancy \(Y_{\ell}\) based on

where \(Y^{\mathrm{LF}}_\ell = \gamma_\ell Q^{\mathrm{LF}}_\ell - Q^{\mathrm{HF}}_\ell\) .

The optimal parameter \(\gamma_\ell\) is computed from the correlation properties between model forms and discretization levels (see the theory manual for further details) and the optimal allocation \(N_\ell\) (per level) is finally obtained from it.

*Default Behavior*

The `multilevel_multifidelity_sampling`

method employs Monte Carlo
sample sets be default, but this default can be overridden to use Latin
hypercube sample sets using `sample_type`

`lhs`

.

*Expected Output*

The `multilevel_multifidelity_sampling`

method reports estimates of
the first four moments and a summary of the evaluations performed for
each model fidelity and discretization level. The method does not
support any level mappings (response, probability, reliability,
generalized reliability) at this time.

*Expected HDF5 Output*

If Dakota was built with HDF5 support and run with the
`hdf5`

keyword, this method
writes the following results to HDF5:

Sampling Moments (moments only, not confidence intervals)

In addition, the execution group has the attribute `equiv_hf_evals`

, which
records the equivalent number of high-fidelity evaluations.

*Usage Tips*

The `multilevel_multifidelity_sampling`

method must be used in
combination with an ensemble model specification. The highest and
lowest fidelity model must provide multiple discretization levels, for
which it is necessary to identify the variable string descriptor that
controls the resolution levels using `solution_level_control`

as well
as the associated array of relative costs using
`solution_level_cost`

.

**Examples**

The following method block

```
method,
model_pointer = 'HIERARCH'
multilevel_multifidelity_sampling
pilot_samples = 20 seed = 1237 #s0,#s1,#s2,#s3,#p0,#p1
convergence_tolerance = .01 #s0,#s2,#s3,#p0,#p1
```

specifies a multilevel-multifidelity Monte Carlo study in combination with the model identified by the HIERARCH pointer. This model specification provides a two-dimensional hierarchy, comprised of two model forms each with four discretization levels:

```
model,
id_model = 'HIERARCH'
surrogate ensemble
ordered_model_fidelities = 'LF' 'HF'
model,
id_model = 'LF'
simulation
solution_level_control = 'N_x'
solution_level_cost = 375. 10125. 81000. 648000.
model,
id_model = 'HF'
simulation
solution_level_control = 'N_x'
solution_level_cost = 5.67e+5 4.536e+6 2.1e+7 1.68e+8
```

Refer to `dakota/test/dakota_uq_heat_eq_mlcvmc`

.in in the source
distribution for this case as well as additional examples.