mlmc | R Documentation |
This function is the Multi-level Monte Carlo driver which will sample from the levels of user specified function.
mlmc(
Lmin,
Lmax,
N0,
eps,
mlmc_l,
alpha = NA,
beta = NA,
gamma = NA,
parallel = NA,
...
)
Lmin |
the minimum level of refinement. Must be |
Lmax |
the maximum level of refinement. Must be |
N0 |
initial number of samples which are used for the first 3 levels and for any subsequent levels which are automatically added.
Must be |
eps |
the target accuracy of the estimate (root mean square error).
Must be |
mlmc_l |
a user supplied function which provides the estimate for level The user supplied function should return a named list containing one element named
See the function (and source code of) |
alpha |
the weak error, |
beta |
the variance, |
gamma |
the sample cost, |
parallel |
if an integer is supplied, R will fork |
... |
additional arguments which are passed on when the user supplied |
The Multilevel Monte Carlo Method method originated in the works Giles (2008) and Heinrich (1998).
Consider a sequence P_0, P_1, \ldots
, which approximates P_L
with increasing accuracy, but also increasing cost, we have the simple identity
E[P_L] = E[P_0] + \sum_{l=1}^L E[P_l-P_{l-1}],
and therefore we can use the following unbiased estimator for E[P_L]
,
N_0^{-1} \sum_{n=1}^{N_0} P_0^{(0,n)} + \sum_{l=1}^L \left\{ N_l^{-1} \sum_{n=1}^{N_l} \left(P_l^{(l,n)} - P_{l-1}^{(l,n)}\right) \right\}
where N_l
samples are produced at level l
.
The inclusion of the level l
in the superscript (l,n)
indicates that the samples used at each level of correction are independent.
Set C_0
, and V_0
to be the cost and variance of one sample of P_0
, and C_l, V_l
to be the cost and variance of one sample of P_l - P_{l-1}
, then the overall cost and variance of the multilevel estimator is \sum_{l=0}^L N_l C_l
and \sum_{l=0}^L N_l^{-1} V_l
, respectively.
The idea behind the method, is that provided that the product V_l C_l
decreases with l
, i.e. the cost increases with level slower than the variance decreases, then one can achieve significant computational savings, which can be formalised as in Theorem 1 of Giles (2015).
For further information on multilevel Monte Carlo methods, see the webpage https://people.maths.ox.ac.uk/gilesm/mlmc_community.html which lists the research groups working in the area, and their main publications.
This function is based on GPL-2 'Matlab' code by Mike Giles.
A named list containing:
P
The MLMC estimate;
Nl
A vector of the number of samples performed on each level;
Cl
Per sample cost at each level.
Louis Aslett <louis.aslett@durham.ac.uk>
Mike Giles <Mike.Giles@maths.ox.ac.uk>
Tigran Nagapetyan <nagapetyan@stats.ox.ac.uk>
Giles, M.B. (2008) 'Multilevel Monte Carlo Path Simulation', Operations Research, 56(3), pp. 607–617. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1287/opre.1070.0496")}.
Giles, M.B. (2015) 'Multilevel Monte Carlo methods', Acta Numerica, 24, pp. 259–328. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1017/S096249291500001X")}.
Heinrich, S. (1998) 'Monte Carlo Complexity of Global Solution of Integral Equations', Journal of Complexity, 14(2), pp. 151–175. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1006/jcom.1998.0471")}.
mlmc(2, 6, 1000, 0.01, opre_l, option = 1)
mlmc(2, 10, 1000, 0.01, mcqmc06_l, option = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.