Skip to content

Commit 73fe045

Browse files
committed
22prev
1 parent 6ebd599 commit 73fe045

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/src/manuals/model-specification.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ Specifically for the Gaussian/Normal case we have custom implementations that yi
263263
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

265265
```@example model-specification-visualization
266+
using RxInfer
267+
266268
@model function coin_toss(y)
267269
t ~ Beta(1, 1)
268270
for i in eachindex(y)
@@ -271,8 +273,8 @@ Models specified using GraphPPL.jl in RxInfer.jl can be visualized in several wa
271273
end
272274
273275
model_generator = coin_toss() | (y = [ true, false, true ], )
274-
model = RxInfer.getmodel(RxInfer.create_model(model_generator))
275-
nothing #
276+
model_to_plot = RxInfer.getmodel(RxInfer.create_model(model_generator))
277+
nothing #hide
276278
```
277279

278280
### [GraphViz.jl](@id user-guide-model-specification-visualization-graphviz)
@@ -284,7 +286,7 @@ Note that this package is not included in the `RxInfer` package and must be inst
284286
using GraphViz
285287
286288
# Call `load` function from `GraphViz` to visualise the structure of the graph
287-
GraphViz.load(model, strategy = :simple)
289+
GraphViz.load(model_to_plot, strategy = :simple)
288290
```
289291

290292
### [Cairo](@id user-guide-model-specification-visualization-cairo)
@@ -296,7 +298,7 @@ Note, that those packages are also not included in the `RxInfer` package and mus
296298
using Cairo, GraphPlot
297299
298300
# Call `gplot` function from `GraphPlot` to visualise the structure of the graph
299-
GraphPlot.gplot(model)
301+
GraphPlot.gplot(model_to_plot)
300302
```
301303

302304
## Node Contraction

0 commit comments

Comments
 (0)