Skip to content

Commit bbdc4de

Browse files
authored
Merge pull request #384 from ReactiveBayes/gppl-4.4.0
Update deps to GraphPPL 4.4.0 and update docs on the visualization
2 parents eb2ad95 + 73fe045 commit bbdc4de

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RxInfer"
22
uuid = "86711068-29c9-4ff7-b620-ae75d7495b3d"
33
authors = ["Bagaev Dmitry <d.v.bagaev@tue.nl> and contributors"]
4-
version = "3.7.2"
4+
version = "3.8.0"
55

66
[deps]
77
BayesBase = "b4ee3484-f114-42fe-b91c-797d54a0c67e"
@@ -36,7 +36,7 @@ DomainSets = "0.5.2, 0.6, 0.7"
3636
ExponentialFamily = "1.5"
3737
ExponentialFamilyProjection = "1.1"
3838
FastCholesky = "1.3.0"
39-
GraphPPL = "~4.3.0"
39+
GraphPPL = "~4.4.0"
4040
LinearAlgebra = "1.9"
4141
MacroTools = "0.5.6"
4242
Optim = "1.0.0"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Our high-level project roadmap outlines the key milestones and focus areas for t
166166

167167
| Q1/Q2 2024 | Q3/Q4 2024 | 2025 |
168168
|---------------------|---------------------------|--------------------|
169-
| 🧩 **Nested models with [GraphPPL.jl](https://github.com/reactivebayes/GraphPPL.jl)**| 🌐 **Graph structure visualization** | 🔀 **Stochastic Processes** |
169+
| 🧩 **Nested models with [GraphPPL.jl](https://github.com/reactivebayes/GraphPPL.jl)**| 🌐 **Graph structure visualization** | 🔀 **Stochastic Processes** |
170170
| 🔄 **Development of [ExponentialFamilyProjection.jl]()**| 🧠 **Automated inference with [ExponentialFamilyProjection.jl](https://github.com/reactivebayes/ExponentialFamilyProjection.jl)** | 🚀 **Robustness & Memory-efficiency** |
171171

172172
For a more granular view of our progress and ongoing tasks, check out our [project board](https://github.com/orgs/reactivebayes/projects/2/views/4) or join our 4-weekly [public meetings](https://dynalist.io/d/F4aA-Z2c8X-M1iWTn9hY_ndN).
@@ -195,7 +195,7 @@ RxInfer is a community-driven project and we welcome all contributions! To get s
195195
## Active Inference Institute Collaboration
196196

197197
The [Active Inference Institute](https://www.activeinference.org/) community members are enhancing RxInfer/GraphPPL's visualization capabilities. Their work includes:
198-
- Developing advanced model visualization features
198+
- Developing advanced model visualization features ✅ ([PR](https://github.com/ReactiveBayes/GraphPPL.jl/pull/251))
199199
- Creating summary and subgraph visualization modalities
200200
- Implementing various graph layout algorithms
201201
- Improving model inspection and understanding tools

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"downloadUrl": "https://github.com/reactivebayes/RxInfer.jl/releases",
1010
"issueTracker": "https://github.com/reactivebayes/RxInfer.jl/issues",
1111
"name": "RxInfer.jl",
12-
"version": "3.7.2",
12+
"version": "3.8.0",
1313
"description": "Julia package for automated, scalable and efficient Bayesian inference on factor graphs with reactive message passing. ",
1414
"applicationCategory": "Statistics",
1515
"developmentStatus": "active",
1616
"readme": "https://reactivebayes.github.io/RxInfer.jl/stable/",
17-
"softwareVersion": "3.7.2",
17+
"softwareVersion": "3.8.0",
1818
"keywords": [
1919
"Bayesian inference",
2020
"message passing",

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ExponentialFamily = "62312e5e-252a-4322-ace9-a5f4bf9b357b"
88
ExponentialFamilyProjection = "17f509fa-9a96-44ba-99b2-1c5f01f0931b"
99
GraphPPL = "b3f8163a-e979-4e85-b43e-1f63d8c8b42c"
1010
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
11+
GraphViz = "f526b714-d49f-11e8-06ff-31ed36ee7ee0"
1112
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
1213
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1314
ReactiveMP = "a194aa59-28ba-4574-a09c-4a745416d6e3"

docs/src/manuals/model-specification.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,45 @@ Specifically for the Gaussian/Normal case we have custom implementations that yi
260260

261261
## [Model structure visualisation](@id user-guide-model-specification-visualization)
262262

263-
It is also possible to visualize the model structure after conditioning on data. For that we need two extra packages installed: `Cairo` and `GraphPlot`. Note, that those packages are not included in the `RxInfer` package and must be installed separately.
263+
Models specified using GraphPPL.jl in RxInfer.jl can be visualized in several ways to help understand their structure and relationships between variables. Let's create a simple model and visualize it.
264264

265-
```@example model-specification-ssm
266-
using Cairo, GraphPlot
265+
```@example model-specification-visualization
266+
using RxInfer
267+
268+
@model function coin_toss(y)
269+
t ~ Beta(1, 1)
270+
for i in eachindex(y)
271+
y[i] ~ Bernoulli(t)
272+
end
273+
end
274+
275+
model_generator = coin_toss() | (y = [ true, false, true ], )
276+
model_to_plot = RxInfer.getmodel(RxInfer.create_model(model_generator))
277+
nothing #hide
278+
```
267279

268-
# `Create` the actual graph of the model conditioned on the data
269-
model = RxInfer.create_model(conditioned)
280+
### [GraphViz.jl](@id user-guide-model-specification-visualization-graphviz)
281+
282+
It is possible to visualize the model structure after conditioning on data with the `GraphViz.jl` package.
283+
Note that this package is not included in the `RxInfer` package and must be installed separately.
284+
285+
```@example model-specification-visualization
286+
using GraphViz
287+
288+
# Call `load` function from `GraphViz` to visualise the structure of the graph
289+
GraphViz.load(model_to_plot, strategy = :simple)
290+
```
291+
292+
### [Cairo](@id user-guide-model-specification-visualization-cairo)
293+
294+
There is an alternative way to visuzalise the model structure with `Cairo` and `GraphPlot`
295+
Note, that those packages are also not included in the `RxInfer` package and must be installed separately.
296+
297+
```@example model-specification-visualization
298+
using Cairo, GraphPlot
270299
271300
# Call `gplot` function from `GraphPlot` to visualise the structure of the graph
272-
GraphPlot.gplot(RxInfer.getmodel(model))
301+
GraphPlot.gplot(model_to_plot)
273302
```
274303

275304
## Node Contraction

0 commit comments

Comments
 (0)