A point process on a space is a random bag of elements of that space. In this paper we explore programming with point processes in a monadic style. To this end we identify point processes on a space X with probability measures of bags of elements in X. We describe this view of point processes using the composition of the Giry and bag monads on the category of measurable spaces and functions and prove that this composition also forms a monad using a distributive law for monads. Finally, we define a morphism from a point process to its intensity measure, and show that this is a monad morphism. A special case of this monad morphism gives us Wald's Lemma, an identity used to calculate the expected value of the sum of a random number of random variables. Using our monad we define a range of point processes and point process operations and compositionally compute their corresponding intensity measures using the monad morphism.
翻译:一个空格上的点进程是该空格元素的随机包件 。 在本文中, 我们用一个月度风格的点进程来探索该空格中的点进程 。 为此, 我们确定一个空间 X 的点进程, 并用 X 中元素包的概率度量 。 我们用可测量空间和函数类别的 Girry 和 bag monad 来描述点进程的这种观点, 并用月度空间和函数的分布法来证明这种构成也构成一个月度 。 最后, 我们从一个点进程到它的强度度量来定义一个形态, 并显示这是一个月度形态。 这个月度形态的特例给了我们 Wald 的 Lemma, 这是用来计算随机变量数之和的预期值的特性 。 我们用月度来定义一个点进程和点进程操作的范围, 并使用月度形态来计算相应的强度度量 。