Comments (1)
The FFG wasn't constructed properly, in particular, the observations were causing a collider. The code below fixes the issue.
using ForneyLab
n_samples = 100
A = [1 1; 0 1] # Transtiion matrix
u = [0.5, 1] # Control vector
c = zeros(2); c[1] = 1 # unit vector (observation vector)
x = [A*[x_t, 1] for x_t in 1:n_samples] # real state
y = [c'x[t] + sqrt(100)*randn() for t in 1:n_samples] # noisy observations of postition
# Graph definition
g = FactorGraph()
@RV x_t_min ~ GaussianMeanVariance(placeholder(:m_x_t_min, dims=(2,)),
placeholder(:v_x_t_min, dims=(2, 2)))
@RV x_t = A*x_t_min
c = zeros(2); c[1] = 1;
@RV y_t ~ GaussianMeanPrecision(dot(c, x_t), 0.01)
placeholder(y_t, :y_t)
ForneyLab.draw(g)
# Specify recognition factorization
q = RecognitionFactorization(x_t, ids=[:X_t])
# Construct free energy algorithm
algoF = freeEnergyAlgorithm()
println(algoF)
from forneylab.jl.
Related Issues (20)
- messagePassingAlgorithm not found HOT 1
- MethodError: no method matching length(::Variable) HOT 2
- KeyError: key :log_pdf not found HOT 1
- Algorithm construction bug (Nonlinear node) HOT 1
- TagBot trigger issue HOT 3
- Question: Can ForneyLab do parameter learning and graph structure learning? HOT 3
- code generation for repetitive graph structure HOT 3
- Belief Propagation HOT 2
- Error: No applicable marginal update rule for GaussianMeanVariance node with inbound types: Message{GaussianWeightedMeanPrecision}, Message{GaussianMeanVariance}
- Multiplication of two categorical variables HOT 2
- Incorrect outbound message update rules for GaussianMeanVariance HOT 1
- Where are parameters stored in ForneyLab.Bernoulli? HOT 3
- ForneyLab.step! must be explicitly imported HOT 29
- Deterministic to non-deterministic HOT 2
- A Discrete Bayesian Graph HOT 16
- ForneyLab License clarification
- Cutoff and epsilon values
- The update rule for the output of Poisson node is incorrect.
- http://forneylab.org/ domain expired HOT 1
- Free energy computation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forneylab.jl.