Integration(specification, size, seed=None)¶
Configuration for building integration nodes and weights.
specification (str) –
How to build nodes and weights. One of the following:
'monte_carlo'- Draw from a pseudo-random standard multivariate normal distribution. Integration weights are
1 / size.
'product'- Generate nodes and weights according to the level-
sizeGauss-Hermite product rule.
'nested_product'- Generate nodes and weights according to the level-
sizenested Gauss-Hermite product rule. Weights can be negative.
'grid'- Generate a sparse grid of nodes and weights according to the level-
sizeGauss-Hermite quadrature rule. Weights can be negative.
'nested_grid'- Generate a sparse grid of nodes and weights according to the level
sizenested Gauss-Hermite quadrature rule. Weights can be negative.
Best practice for low dimensions is probably to use
'product'to a relatively high degree of polynomial accuracy. In higher dimensions,
'grid'appears to scale the best. For more information, see Judd and Skrainka (2011) and Conlon and Gortmaker (2019).
size (int) – The number of draws if
'monte_carlo', and the level of the quadrature rule otherwise.
seed (int, optional) – Passed to
'monte_carlo'to seed the random number generator before building nodes. By default, a seed is not passed to the random number generator.