We show that streams and lazy data structures are a natural idiom for programming with infinite-dimensional Bayesian methods such as Poisson processes, Gaussian processes, jump processes, Dirichlet processes, and Beta processes. The crucial semantic idea, inspired by developments in synthetic probability theory, is to work with two separate monads: an affine monad of probability, which supports laziness, and a commutative, non-affine monad of measures, which does not. (Affine means that $T(1)\cong 1$.) We show that the separation is important from a decidability perspective, and that the recent model of quasi-Borel spaces supports these two monads. To perform Bayesian inference with these examples, we introduce new inference methods that are specially adapted to laziness; they are proven correct by reference to the Metropolis-Hastings-Green method. Our theoretical development is implemented as a Haskell library, LazyPPL.
翻译:我们显示,流和懒惰的数据结构是使用波索松进程、高森进程、跳跃进程、迪里赫莱进程和贝塔进程等无孔不入的贝叶斯方法进行编程的自然标准。 由合成概率理论的发展所启发的关键语义理念是用两种不同的摩登来操作:一种支持拉西的概率的松式月球,一种支持拉西度的通融、非硬度的度量度月球,而不是。 (Affie 意指$T(1)\cong 1美元。 )我们表明,分离从可变性的角度来说很重要,而最近准布尔空间模型支持这两个摩登。为了用这些例子进行巴伊西亚的推理,我们采用了新的推理方法,这些方法特别适应了拉西度;它们通过引用Metropolis-Hastings-Grow方法被证明是正确的。 我们的理论发展是作为Haskell图书馆LzyPL实施的。