Skip to main content

Research Repository

Advanced Search

Getting more out of Stan: some ideas from the Haskell bindings

NILSSON, HENRIK; NIELSEN, THOMAS A.; STEINITZ, DOMINIC

Authors

HENRIK NILSSON

THOMAS A. NIELSEN

DOMINIC STEINITZ



Abstract

Stan has emerged as the most practical and widely used probabilistic programming language for Bayesian computation. As the capabilities within Stan for further processing of results from probabilistic computations is limited, Stan is often used from a host language such as R or Python through bindings forming an API. However, the structure of these bindings is such that it for many purposes is necessary to replicate the probabilistic model twice: once in Stan for inference, and once in the host language for simulation and prediction. This duplication of work is undesirable for many reasons. This paper investigates a different approach to structuring Stan bindings that mitigating this problem. The central idea is a first-class representation of the Stan model in the host language, allowing models to be constructed programmatically and then used in different ways. The paper demonstrates the ideas in the context of Haskell, but the ideas are applicable to most host languages of interest.

Citation

NILSSON, H., NIELSEN, T. A., & STEINITZ, D. (2018). Getting more out of Stan: some ideas from the Haskell bindings

Conference Name StanCon 2018
Start Date Aug 29, 2018
End Date Aug 31, 2018
Acceptance Date May 23, 2018
Online Publication Date Jul 20, 2018
Publication Date Jul 20, 2018
Deposit Date Dec 18, 2018
Public URL https://nottingham-repository.worktribe.com/output/1151875
Publisher URL http://mc-stan.org/events/stancon2018Helsinki/


Downloadable Citations