gemseo_umdo / statistics / multilevel / mlmc / pilots

Hide inherited members

variance module

The variance-based pilot for the MLMC algorithm.

class gemseo_umdo.statistics.multilevel.mlmc.pilots.variance.Variance(sampling_ratios, costs)[source]

Bases: MLMCPilot

The variance-based pilot for the MLMC algorithm.

See also

El Amri et al., Algo. 1, Multilevel Surrogate-based Control Variates, 2023.

Parameters:
  • sampling_ratios (NDArray[float]) – The sampling ratios $r_0,ldots,r_L$; the sampling ratio $r_ell$ is the factor by which $n_ell$ is increased between two sampling steps on the level $ell$.

  • costs (NDArray[float]) – The unit sampling costs of each level of the telescopic sum. Namely, $(mathcal{C}_{ell-1}+mathcal{C}_ell)_{ellin{0,ldots,L}}$ with $mathcal{C}_{-1}=0$.

compute_next_level_and_statistic(levels, total_n_samples, samples, *pilot_parameters)

Compute the next level $ell^*$ to sample and estimate the statistic.

Parameters:
  • levels (Iterable[int]) – The levels that have just been sampled.

  • total_n_samples (ndarray[Any, dtype[int]]) – The total number of samples of each level.

  • samples (Sequence[ndarray[Any, dtype[float]]]) – The samples of the different quantities of each level.

  • *pilot_parameters (Any) – The parameters of the pilot.

Returns:

The next level $ell^*$ to sample and an estimation of the statistic.

Return type:

tuple[int, numpy.ndarray[Any, numpy.dtype[float]]]

V_l: NDArray[float]

The terms variances $mathcal{V}_0,ldots,mathcal{V}_L$.