PGMax icon indicating copy to clipboard operation
PGMax copied to clipboard

add example of learning a directed graphical model

Open murphyk opened this issue 3 years ago • 1 comments

It would be cool to show how to fit an HMM with Gaussian local evidence potentials. The model would be

p(z(1:T)) = 1/Z prod_{t=1} Psi(z(t), z(t-1)) Phi(z(t))
 Psi(z(t), z(t-1)) = p(z(t)|z(t-1))
Phi(z(t)) = gauss(x(t) | mu_{z(t)}, sigma I)

You use LBP to compute the (exact!) marginal likelihood and then do gradient descent for the params. Or you could recreate our discrete HMM example at https://github.com/probml/JSL/blob/main/jsl/demos/hmm_casino_sgd_train.py

murphyk avatar Feb 12 '22 18:02 murphyk

It would be great also just to have an example of inference in a directed graphical model. e.g. just the standard sprinkler example would be really useful for getting a handle on how to use the package.

nathanielvirgo avatar Feb 14 '22 03:02 nathanielvirgo