level module¶
A level $ell$ for the MLMC-MLCV algorithm.
- class gemseo_umdo.statistics.multilevel.mlmc_mlcv.level.Level(model, surrogate_model, difference_surrogate_model=(), cost=None, n_cost_estimation_samples=1, n_initial_samples=10, sampling_ratio=2.0)[source]¶
Bases:
object
A level $ell$ for the MLMC-MLCV algorithm.
- Parameters:
model (MDOFunction) –
surrogate_model (tuple[MDOFunction, float]) –
difference_surrogate_model (tuple[MDOFunction, float]) –
By default it is set to ().
cost (float | None) –
n_cost_estimation_samples (int) –
By default it is set to 1.
n_initial_samples (int) –
By default it is set to 10.
sampling_ratio (float) –
By default it is set to 2.0.
- difference_surrogate_model: tuple[MDOFunction, float] = ()¶
The surrogate model $h_ell$ approximating $f_ell-f_{ell-1}$.
More precisely, $h_ell$ and its statistic for the [MLMCMLCV][gemseo_umdo.statistics.multilevel.mlmc_mlcv.mlmc_mlcv.MLMCMLCV] algorithm.
Empty at level $ell=0$.
The surrogate model can be set from any callable taking a NumPy array of float numbers as input and outputting either a float number or a NumPy array of float numbers.
- model: MDOFunction¶
The model $f_ell$ to sample.
This model can be set from any callable taking a NumPy array of float numbers as input and outputting either a float number or a NumPy array of float numbers.
- n_cost_estimation_samples: int = 1¶
The number of $f_ell$ calls to estimate $mathcal{C}_ell$.
It will be used only if
cost
isNone
.
- surrogate_model: tuple[MDOFunction, float]¶
The surrogate model $g_ell$ approximating $f_ell$.
More precisely, $g_ell$ and its statistic for the [MLMCMLCV][gemseo_umdo.statistics.multilevel.mlmc_mlcv.mlmc_mlcv.MLMCMLCV] algorithm.
The surrogate model can be set from any callable taking a NumPy array of float numbers as input and outputting either a float number or a NumPy array of float numbers.