arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1505.05093stat.CO
收藏

使用模型编程:使用NIMBLE编写通用模型结构的统计算法

Programming with models: writing statistical algorithms for general model structures with NIMBLE

Perry de Valpine, Daniel Turek, Christopher J. Paciorek, Clifford Anderson-Bergman, Duncan Temple Lang, Rastislav Bodik

摘要:

我们描述了NIMBLE,一个用于在R中为一般模型结构编程统计算法的系统。NIMBLE旨在应对三个挑战:灵活的模型规范,可以使用不同模型的编程算法语言,以及高级可编程性和执行效率之间的平衡。对于模型规范,NIMBLE扩展了BUGS语言并创建了模型对象,这些对象可以操作变量,计算日志概率值,生成模拟,并查询变量之间的关系。对于算法编程,NIMBLE提供了使用两个评估阶段对模型对象进行操作的函数。第一阶段允许将函数专门化到特定模型和/或节点,例如为特定节点块创建Metropolis-Hastings采样器。第二阶段允许使用第一阶段的结果重复执行计算。为了实现高效的第二阶段计算,NIMBLE通过C++编译模型和函数,使用线性代数的Eigen库,并为用户提供编译对象的接口。NIMBLE语言代表了嵌入在R中的可编译的领域特定语言(DSL)。本文提供了一个概述的设计和理由,以及说明性的例子,包括重要性抽样,马尔可夫链蒙特卡罗(MCMC)和蒙特卡罗期望最大化(MCEM)的NIMBLE。

英文摘要:

We describe NIMBLE, a system for programming statistical algorithms for general model structures within R. NIMBLE is designed to meet three challenges: flexible model specification, a language for programming algorithms that can use different models, and a balance between high-level programmability and execution efficiency. For model specification, NIMBLE extends the BUGS language and creates model objects, which can manipulate variables, calculate log probability values, generate simulations, and query the relationships among variables. For algorithm programming, NIMBLE provides functions that operate with model objects using two stages of evaluation. The first stage allows specialization of a function to a particular model and/or nodes, such as creating a Metropolis-Hastings sampler for a particular block of nodes. The second stage allows repeated execution of computations using the results of the first stage. To achieve efficient second-stage computation, NIMBLE compiles models and functions via C++, using the Eigen library for linear algebra, and provides the user with an interface to compiled objects. The NIMBLE language represents a compilable domain-specific language (DSL) embedded within R. This paper provides an overview of the design and rationale for NIMBLE along with illustrative examples including importance sampling, Markov chain Monte Carlo (MCMC) and Monte Carlo expectation maximization (MCEM).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑