Programming with models: writing statistical algorithms for general model structures with NIMBLE
收藏DataCite Commons2020-09-04 更新2024-07-27 收录
下载链接:
https://tandf.figshare.com/articles/dataset/Programming_with_models_writing_statistical_algorithms_for_general_model_structures_with_NIMBLE/3159727
下载链接
链接失效反馈官方服务:
资源简介:
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).
本文介绍NIMBLE——一款用于在R语言环境中为通用模型结构开发统计算法的系统。NIMBLE的设计旨在应对三大核心挑战:灵活的模型规范定义、可适配多类模型的算法编程语言,以及兼顾高阶编程易用性与执行效率的平衡。在模型规范定义环节,NIMBLE对BUGS语言(BUGS language)进行了扩展,并创建了模型对象;此类对象可实现变量操作、对数概率值计算、模拟样本生成以及变量间关系查询等功能。在算法编程方面,NIMBLE提供了支持两阶段求值的函数,用于操作模型对象。第一阶段支持将函数针对特定模型及/或节点进行定制化开发,例如为特定节点块创建马尔可夫-哈斯汀斯(Metropolis-Hastings)采样器;第二阶段则可基于第一阶段的输出结果,实现计算任务的重复执行。为保障第二阶段计算的高效性,NIMBLE借助用于线性代数运算的Eigen库(Eigen library),通过C++语言对模型与函数进行编译,并为用户提供编译后对象的交互接口。NIMBLE语言本质上是一种嵌入于R语言中的可编译领域特定语言(domain-specific language,DSL)。本文全面概述了NIMBLE的设计思路与设计原理,并辅以包括重要性采样、马尔可夫链蒙特卡洛(Markov chain Monte Carlo,MCMC)以及蒙特卡洛期望最大化(Monte Carlo expectation maximization,MCEM)在内的示例进行演示说明。
提供机构:
Taylor & Francis
创建时间:
2016-04-06



