SoftwareX (Feb 2025)

pyLAIS: A Python package for Layered Adaptive Importance Sampling

  • Ernesto Curbelo,
  • Luca Martino,
  • David Delgado-Gómez

Journal volume & issue
Vol. 29
p. 101976

Abstract

Read online

Monte Carlo (MC) techniques are widely used to draw from complex distributions and/or for the calculation of related integrals. The most famous families of MC methods are Markov Chain Monte Carlo (MCMC) and importance sampling (IS). There are many separate implementations and packages, available online regarding MCMC or IS methods. Moreover, both techniques present different drawbacks and advantages. In this paper, we introduce a flexible Python implementation of the so-called layered adaptive importance sampling (LAIS) algorithm. LAIS combines the benefits of MCMC and IS schemes: the exploration of the state space by Markov chains and the low variance estimations provides by advanced and modern IS schemes. More precisely, LAIS allows the sampling of complex distributions and/or approximation of integrals involving complex distributions, through the combination of – possibly sophisticated – MCMC schemes and multiple importance sampling (MIS) techniques. In addition, the modular nature of the algorithm itself provides a great flexibility in choosing the desired MCMC techniques, invariant distributions, proposal densities and MIS approaches.

Keywords