The aim of this talk is to introduce two pieces of software, ``Lattice Builder'' and ``Stochastic Simulation in Java'' (SSJ). They allow to easily conduct experiments that rely on Monte Carlo (MC), quasi-Monte Carlo (QMC), or randomized QMC (RQMC). Lattice Builder is a C++ library designed to efficiently search, produce, and examine rank-1-lattices as well as polynomial lattices. It allows the user to choose from a broad palette of search criteria, types of weights, and construction methods, which can be accessed through a graphical interface as well as through a command line tool. Its structure also facilitates the implementation of own extensions and encourages to combine Lattice Builder with other programming languages.
SSJ is a Java library covering an extensive set of tools for stochastic simulations. It is particularly useful for experiments relying on MC and (R)QMC, ranging from integration problems over RQMC for Markov Chains (Array-RQMC) to density estimation.
This talk gives an introductory tour through the interfaces of Lattice Builder, shows how to integrate it into SSJ, and provides first steps in SSJ based on an example for mean estimation with RQMC.
Similar to QMC: Transition Workshop - Monte Carlo and (Randomized) Quasi-Monte Carlo Simulations with Lattice Builder and SSJ - Florian Pluchhammer, May 8, 2018
International Journal of Engineering Research and Development (IJERD)IJERD Editor
Similar to QMC: Transition Workshop - Monte Carlo and (Randomized) Quasi-Monte Carlo Simulations with Lattice Builder and SSJ - Florian Pluchhammer, May 8, 2018 (20)
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
QMC: Transition Workshop - Monte Carlo and (Randomized) Quasi-Monte Carlo Simulations with Lattice Builder and SSJ - Florian Pluchhammer, May 8, 2018
1. MC AND (R)QMC SIMULATIONS
WITH LATTICE BUILDER AND SSJ
Maxime Godin, Ayman Jemel, Pierre L’Ecuyer, Pierre Mar-
ion, David Munger
Florian Puchhammer
May 08, 2018
Université de Montréal, Canada
2. Table of contents
Lattice Builder
Web interface: Show and tell
The command line tool
Stochastic simulation in Java (SSJ)
Mean estimation with RQMC
Future Plans
1/19
4. What is Lattice Builder?
Goal: obtain highly unifrom point set Joint work with in [0, 1)d for
integration/simulation/...
A C++ library designed to generate (polynomial) lattice
point sets.
Provides GUI via web interface.
Implements a command line tool.
Offers following advantages:
High level of generalization.
Easy to extend.
Can be combined with other software.
2/19
5. Types of lattices I
Ordinary lattice (Rank-1-lattice):
Construction with generating vector a ∈ Ns
.
Pn =
i
n
a mod 1 : i ∈ {0, 1, . . . , n − 1} .
Polynomial lattice
...are digital nets in base 2 (n = 2m
).
Choose base polynomial p(x) ∈ F2[x], deg p = m.
Construct generating vector (1, q2, . . . , qs).
Expand
qj(x)
p(x)
=
l≥wj
u
(j)
l x−l
Define the generating matrix Cj, 1 ≤ j ≤ s, via
Cj = u
(j)
i+r
i,r
, 1 ≤ i ≤ m, 0 ≤ r < m.
3/19
6. Types of lattices II
Embedded lattice
Exist for both, polynomial and ordinary lattices.
One generating vector for n = 2k1
, 2k2
, 2k3
, . . .
4/19
9. Figure of merit (FOM) I
Goal: Want good lattice point set for our specific problem.
use FOM to assess quality of lattice point set.
General form:
[D(Pn)]q
=
∅=u⊆{1,...,s}
γq
u [Du(Pn)]q
Special form: Coordinate uniform (q = 2). Allows for fast
evaluation.
[Du(Pn)]q
=
1
n
n−1
i=0 j∈u
ω(p
(j)
i ).
Types:
6/19
10. Figure of merit (FOM) II
1. Spectral criterion (only for ordinary lattices)
2. Pα criterion (α even)
3. Rα criterion (α > 0)
4. Own criterion? Tutorial!
7/19
11. Weights
Goal: Give some projections/coordinates more attention.
Types:
1. Product weights γu = j∈u γj.
2. Order dependent weights γu = Γ|u|.
3. POD weights γu = Γ|u| j∈u γj.
4. Projection dependent weights (specify for each projection
individually).
5. Any combination of the above.
6. Own weights? Tutorial!
Each weight can be assigned explicitely or via an expression.
8/19
12. Construction Methods
Evaluate: Get merit-value for specific generating vector.
Extend: Increase the number of points.
All Space: Exhaustive search.
Korobov: Search among all vectors of the form
a = (1, a, a2
, . . . , as
) mod n.
CBC: Determine generating vector coordinate-wise.
Fast CBC: Accelerated version of CBC. Uses FFT and requires
coord. uniform FOM.
All Space, Korobov and CBC allow for random versions to shrink
search space.
Each method produces code (C, Python, Matlab) to compute
point set and provides plots.
9/19
14. Overview
Web interface relies on command line tool.
Easy to implement own extensions here Tutorial.
Can be called from other programs without difficulty.
Ideal for simulation purposes.
For polynomial lattices:
Lattice Builder represents polynomials by sequence of
digits, e.g.
[1011] ←→ 1 + z2
+ z3
.
Can create file-output of generating matrices, formatted for
further use in Stochastic Simulation in Java (SSJ).
10/19
15. Commands
List of commands given in documentation.
Can also be obtained by calling Lattice Builder with the
option --help.
Web interface offers “cheating” button.
11/19
17. What is it, what can it do?
Java library designed for stochastic simulation.
Extensive range of tools for all kinds of problems:
Mean estimation
Array-RQMC
Density estimation
...
Focus on mean estimation with RQMC.
12/19
19. Mean estimation
Approximation of an integral by empirical mean:
Ef(X) =
[0,1)d
f(x) dx ≈
1
N
N−1
i=0
f(ui).
1. Take PN = {p0, p1, . . . , pN−1} ⊆ [0, 1)d highly uniform.
2. Randomize PN
˜PN = {u0, u2, . . . , uN−1}.
3. Compute empirical mean.
4. Repeat independently m times with same PN .
13/19
20. Examples – Genz’ Gaussian peak function
Consider the integrand
f(x) = exp
−
d
j=1
a2
j (xj − tj)2
.
We use ordinary- and polynomial lattices to compute
[0,1)d
f(x) dx
with d = 3, a = (1, 1, 1), and t = (1/2, 1/2, 1/2).
14/19
21. Ingredients I
Integrand:
Implemented as interface MonteCarloModelDouble
Requires implementation of certain routines, the rest is
handeled automatically.
Covers broad range of models (functions, models from
finance, physics,...).
Point set PN :
Plain MC, lattices, digital nets,...
Possible to use Baker’s transformation.
On deeper level every point set is handled as
RandomStream.
15/19
24. Future Plans
Lattice Builder
Sobol points, digital nets,...
Interlaced polynomial lattices
Different figures of merit (walsh, sobolev, t-value,...)
More construction methods.
Suggestions?
SSJ
Array RQMC
Density estimation
Higher order polynomial lattices
Suggestions?
17/19
25. Further reading and important links I
Lattice Builder home (ordinary lattices only):
http://simul.iro.umontreal.ca/latbuilder/
Lattice Builder reference paper:
http://www.iro.umontreal.ca/~lecuyer/myftp/papers/latbuilder.pdf
Lattice Builder (beta version with polynomial lattices) :
https://github.com/PierreMarion23/latbuilder/tree/polynomial
Lattice Builder web-interface (beta version) :
https://github.com/PierreMarion23/latbuilder/tree/polynomial/web-ui
Lattice Builder online web-interface (beta version) :
https://mybinder.org/v2/gh/PierreMarion23/latbuilder/polynomial?
urlpath=/apps/latbuilder/web-ui/Interface.ipynb
L’Ecuyer, Munger 2012, On Figures of Merit for
Randomly-Shifted Lattice Rules:
https:
//www.iro.umontreal.ca/~lecuyer/myftp/papers/mcqmc10-plenary.pdf
18/19
26. Further reading and important links II
SSJ home: http://simul.iro.umontreal.ca/ssj/indexe.html
SSJ on GitHub:
https://github.com/umontreal-simul/ssj
SSJ user guide:
http://umontreal-simul.github.io/ssj/docs/master/index.html
19/19