You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GraphPPL.jl is a probabilistic programming language focused on probabilistic graphical models. This repository is aimed for advanced users, please refer to the [ReactiveMP.jl](https://github.com/reactivebayes/ReactiveMP.jl) repository for more comprehensive and self-contained documentation and usages examples.
16
+
GraphPPL.jl is a probabilistic programming language focused on probabilistic graphical models. GraphPPL.jl materializes a probabilistic model as a factor graph and provides a set of tools for model specification. GraphPPL.jl is a part of the [RxInfer](https://rxinfer.ml) ecosystem, but it does not explicitly depend on any inference backend. GraphPPL exports a high-level DSL for model specification and allows users to append arbitrary information to nodes in the model. This information can be used by inference backends to perform inference on the model.
17
+
18
+
## Installation
19
+
20
+
To install GraphPPL.jl, you can use the Julia package manager. From the Julia REPL, type `]` to enter the Pkg REPL mode and run:
21
+
22
+
```julia
23
+
pkg> add GraphPPL
24
+
```
25
+
26
+
# Model Specification in GraphPPL
27
+
28
+
GraphPPL.jl provides a high-level DSL for model specification. The DSL is based on the [Julia's](https://julialang.org) macro system and allows users to specify probabilistic models in a concise and intuitive way. The DSL is based on the following principles:
29
+
30
+
-**Model specification should read as a Julia program**. GraphPPL.jl introduces the `~` syntax for model specification.
31
+
-**Any GraphPPL model is a valid submodel**. GraphPPL.jl allows users to specify models as a composition of submodels. This allows users to reuse models and specify complex models in a modular way.
32
+
-**Model specification should be extensible**. GraphPPL.jl allows users to extend the DSL with custom model specification procedures. This allows developers of inference backend to inject desired behavior to the model specification process.
33
+
34
+
To achieve tihs, GraphPPL.jl specifies a protocol for the `@model` macro:
35
+
```julia
36
+
@modelfunctionbeta_bernoulli(x)
37
+
θ ~Beta(1, 1)
38
+
for i ineachindex(x)
39
+
x[i] ~Bernoulli(θ)
40
+
end
41
+
end
42
+
```
17
43
18
44
# Inference Backend
19
45
20
-
GraphPPL.jl does not export any Bayesian inference backend. It provides a simple DSL parser, model generation, constraints specification and meta specification helpers. To run inference on
21
-
generated models user needs to have a Bayesian inference backend with GraphPPL.jl support (e.g. [ReactiveMP.jl](https://github.com/reactivebayes/ReactiveMP.jl)).
46
+
GraphPPL.jl does not export any Bayesian inference backend. It provides a complex DSL parser, model generation, constraints specification and meta specification helpers. To run inference on
47
+
generated models a user needs to have a Bayesian inference backend with GraphPPL.jl support (e.g. [RxInfer.jl](https://rxinfer.ml)).
48
+
49
+
# Documentation
50
+
51
+
For more information about GraphPPL.jl please refer to the [documentation](https://biaslab.github.io/GraphPPL.jl/stable).
52
+
53
+
> [!NOTE]
54
+
> `GraphPPL.jl` API has been changed in version `4.0.0`. See [Migration Guide](https://reactivebayes.github.io/GraphPPL.jl/stable/) for more details.
0 commit comments