SlicStan
所属分类:数学计算
开发工具:F#
文件大小:0KB
下载次数:0
上传日期:2020-10-23 00:37:59
上 传 者:
sh-1993
说明: 一种类似Stan的概率编程语言。,
(A Stan-like probabilistic programming language.,)
文件列表:
LICENSE (1071, 2020-10-22)
SlicStan.sln (1098, 2020-10-22)
SlicStan/ (0, 2020-10-22)
SlicStan/AssemblyInfo.fs (1461, 2020-10-22)
SlicStan/ConstraintSimplification.fs (6374, 2020-10-22)
SlicStan/ConstraintSolver.fs (18799, 2020-10-22)
SlicStan/Elaborate.fs (15826, 2020-10-22)
SlicStan/Enumerate.fs (6294, 2020-10-22)
SlicStan/Examples.fs (21903, 2020-10-22)
SlicStan/Experiment.fs (3448, 2020-10-22)
SlicStan/Factorgraph.fs (14409, 2020-10-22)
SlicStan/Generation.fs (7500, 2020-10-22)
SlicStan/Lexer.fs (102072, 2020-10-22)
SlicStan/Lexer.fsl (2218, 2020-10-22)
SlicStan/MP.fs (8083, 2020-10-22)
SlicStan/Map.fs (1084, 2020-10-22)
SlicStan/MiniStanSyntax.fs (5416, 2020-10-22)
SlicStan/Parser.fs (68425, 2020-10-22)
SlicStan/Parser.fsi (2246, 2020-10-22)
SlicStan/Parser.fsy (4584, 2020-10-22)
SlicStan/Program.fs (4342, 2020-10-22)
SlicStan/Set.fs (1169, 2020-10-22)
SlicStan/Shredding.fs (3956, 2020-10-22)
SlicStan/SlicStan.fsproj (1538, 2020-10-22)
SlicStan/SlicStanSyntax.fs (14086, 2020-10-22)
SlicStan/Transformation.fs (14235, 2020-10-22)
SlicStan/Translate.fs (6262, 2020-10-22)
SlicStan/Typecheck.fs (21774, 2020-10-22)
SlicStan/Util.fs (5190, 2020-10-22)
docs/ (0, 2020-10-22)
docs/Probabilistic Programming with SlicStan (MSc thesis).pdf (2251339, 2020-10-22)
# SlicStan
SlicStan1 is a Stan-like probabilistic programming language that translates to [Stan](https://mc-stan.org/).
It provides automatic program transformations that allow for a more lightweight syntax and
inference optimizations. There are three main ways in which SlicStan and Stan differ:
1. SlicStan contains no program blocks, nor any annotations as to what block a variable
belongs to (other than what the input data to the model is).
2. In SlicStan, there is no need to distinguish between random variables defined
using `~` (e.g. `x ~ normal(0, 1)`) and those defined using pseudo-random number generators
(e.g. `x = normal_rng(0, 1)`).
3. SlicStan supports discrete parameters, as long as the number of discrete parameters is
fixed, known in advance, and their support is finite.
For example, the following program is a valid program in SlicStan:
```Stan
real phi0 ~ beta(1, 1);
real theta0 ~ beta(1, 1);
int<2> z1 ~ bernoulli(theta0);
real phi1 = phi0 * z1 + (1 - phi0) * (1 - z1);
data real y1 ~ normal(phi1, 1);
real theta1 = theta0 * z1 + (1 - theta0) * (1 - z1);
int<2> z2 ~ bernoulli(theta1);
```
This will translate to a Stan program with parameters `phi0` and `theta0`, and
generated quantities `z1` and `z2` (with `z1` being automatically marginalized
out from Stan's target density).
If you are interested in reading more about SlicStan and seeing examples, you
can refer to either the 2019 POPL paper [1] (which also gives the operational density-based
semantics of SlicStan), or the 2017 MSc thesis [2].
> **NOTE**: SlicStan is a research repo, and as such the code is largely experimental, incomplete,
> and poorly documented. If you are looking for a reliable Bayesian workflow, please
> consider [Stan](https://mc-stan.org/). If you are interested in contributing SlicStan's or
> similar ideas to Stan, please have a look at [the Stan3 repo](https://github.com/stan-dev/stanc3).
1 SlicStan stands for "Slightly Less Intensely Constrained Stan".
------------------
## Papers
[1] Gorinova, M. I., Gordon, A. D., Sutton, C., & Vákár, M. (2020).
[Conditional independence by typing](https://arxiv.org/abs/2010.11887). *arXiv preprint arXiv:2010.11887*.
[2] Gorinova, M. I., Gordon, A. D., & Sutton, C. (2019).
[Probabilistic programming with densities in SlicStan: efficient, flexible, and deterministic](https://doi.org/10.1145/3290348).
*Proceedings of the ACM on Programming Languages*, 3(POPL), 1-30.
[3] Gorinova, M. I. (2017). [Probabilistic Programming with SlicStan](http://homepages.inf.ed.ac.uk/s1207807/files/slicstan.pdf).
*MSc dissertation, University of Edinburgh*.
近期下载者:
相关文件:
收藏者: