Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ThijsvdLaar committed Jan 21, 2022
1 parent f13d894 commit c47eb0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.11.4"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand Down
5 changes: 5 additions & 0 deletions src/engines/julia/update_rules/nonlinear_conjugate.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Inplementation based on Khan et al. (2017), "Conjugate-computation variational inference:
# Converting variational inference in non-conjugate models to inferences in conjugate models",
# and Akbayrak et al. (2021), "Extended Variational Message Passing for Automated Approximate
# Bayesian Inference"

export
ruleSPNonlinearCOutNM,
ruleSPNonlinearCIn1MN,
Expand Down
2 changes: 1 addition & 1 deletion test/factor_nodes/test_nonlinear_sampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ end
msg = ruleSPNonlinearSInMX(h, Message(Univariate, GaussianMeanVariance, m=3.0, v=0.1), nothing, Message(Univariate, PointMass, m=2.0))
@test msg.dist.params[:log_pdf](1.0) == 0.23235401329235006
msg = ruleSPNonlinearSInMX(h, 1, Message(Univariate, GaussianMeanVariance, m=3.0, v=0.1), Message(Univariate, GaussianMeanVariance, m=1.0, v=1.0), Message(Univariate, GaussianMeanVariance, m=2.0, v=2.0))
@test msg.dist.params[:log_pdf](1.0) == -1.2626236138954519
@test typeof(msg.dist.params[:log_pdf](1.0)) == Float64
end

@testset "MNonlinearSInMGX" begin
Expand Down

0 comments on commit c47eb0c

Please sign in to comment.