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
Copy file name to clipboardExpand all lines: docs/src/manuals/inference/nonconjugate.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,8 @@ We also assume that `m` and `p` are jointly independent with the `q(m, p) = q(m)
73
73
Dropping the assumption of joint independence would require initializing messages for `m` and `p` without guarantees of convergence.
74
74
Read more about factorization constraints in the [Constraints Specification](@ref user-guide-constraints-specification) guide.
75
75
76
-
The `ProjectedTo` structure is defined in the `ExponentialFamilyProjection` package. To fully explore its capabilities and hyper-parameters, we invite you to read the detailed [documentation](https://github.com/ReactiveBayes/ExponentialFamilyProjection.jl).
76
+
!!! note
77
+
The `ProjectedTo` structure is defined in the `ExponentialFamilyProjection` package. To fully explore its capabilities and hyper-parameters, we invite you to read the detailed [documentation](https://github.com/ReactiveBayes/ExponentialFamilyProjection.jl).
77
78
78
79
### Initialization
79
80
@@ -96,33 +97,37 @@ result = infer(
96
97
data = (y = data,),
97
98
constraints = non_conjugate_model_constraints(),
98
99
initialization = initialization,
99
-
returnvars = KeepLast(),
100
-
iterations = 5,
100
+
iterations = 25,
101
101
free_energy = true
102
102
)
103
103
```
104
104
105
105
### Analyzing the Results
106
106
107
-
Let's analyze the results using the `StatsPlots` package to visualize the resulting posteriors:
107
+
Let's analyze the results using the `StatsPlots` package to visualize the resulting posteriors over individual VMP iterations:
As we can see, the inference runs without any problems, and the estimated posteriors are quite close to the actual hidden parameters used to generate our dataset. We can also verify the [Bethe Free Energy](@ref lib-bethe-free-energy) values to ensure our result has converged:
130
+
As we can see, the estimated posteriors are quite close to the actual hidden parameters used to generate our dataset. We can also verify the [Bethe Free Energy](@ref lib-bethe-free-energy) values to ensure our result has converged:
0 commit comments