Closed murphyk closed 9 months ago
Wow! The man himself. Thank you for your contribution, I'll add the fix right away. For the variables, you mean instead of naming them as A, B, C, ..., they should be named as Smoking, Tuberculosis, ..., right ?
Yes, for the variable names in the chain graph example, I mean: be consistent with the Cowell book. For example, they write p(C,D | B,E) = phi(C,D,B) phi(C,B,E) 1/Z(B,E) but you write p(H,I|B,D) = phi(H,I,B) phi(H,B,D) phi(B,D) where H=Cough, I=Dysponea, B=Bronchitis, D=Either. This is confusing.
Okay I see what you mean, I'll fix it right away
The latest commit 0a6ec0c in master
branch now updates the usage examples section of the docs, related notebooks and aligns the names of variables in LWF-Chain graph example to those of Cowell as shown in here.
Thank you again for bringing this up.
The library is still undergoing heavy refactoring, and I plan to break backwards compatibility on a lot of the existing api for the next release. I am particularly unsatisfied about how random variables are handled currently. If you have any recommendations both in terms of features or in terms of api design, usage or others, I'd love to hear it.
This is now much clearer. I suggest updating https://github.com/D-K-E/graphical-models/tree/master#usage-examples so it points to the new example notebooks, rather than the old page.
(BTW I updated the image at https://gist.github.com/murphyk/e157531793f87f3d1eb9542234e6bc7d, so the single letter variable names match the book, rather than your old code)
The usage examples at https://d-k-e.github.io/graphical-models/html/d3/db0/md_graphical-models_docs_mdpages_usage.html do not run with the current code. I fixed the issues and put the new version here: https://github.com/probml/pyprobml/blob/master/notebooks/misc/pygmodels_doc.ipynb
I also added a visualization of the chain graph here: https://gist.github.com/murphyk/e157531793f87f3d1eb9542234e6bc7d However I suggest you rename the variables so they match the notation in the book...