-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting BNs to factor graphs or MRFs #54
Comments
Yes, definitely! We would welcome a PR. |
We currently do not have an MRF representation. It would be possible to create a MarkovNets.jl package or similar, and it would likely share many things in common with BayesNets.jl. What did you have in mind? |
I was thinking of reproducing what pgmpy does here with both FG and MRF types within BayesNets.jl. It would indeed maybe make more sense to create a new package - and it would indeed share many things with BayesNets.jl. |
Maybe create FactorGraphs.jl and have BayesNets.jl use it? |
How about this - I try to come up with something in my fork of BayesNets.jl and then we can look at it and figure out where to go from there. I'm planning to start with MRFs and essentially copy your design choices (MRF contains a LightGraph.jl undirected graph). Let me know if you want to discuss further or have any advice! |
Sounds good to me. |
Perfect |
Hey, so I created an MRF representation, as well as a couple of helper functions, methods, and the associated Gibbs sampler - all heavily influenced by your structure. |
Thank you. I just wanted to let you know that I will check this on Monday. |
I want to contribute but am just trying to keep afloat at the moment. |
Great work! The notebook is really, really cool. Some comments:
To discuss:
|
Thanks! Yes, I think having a general, abstract @hpoit 's Markov Logic Networks could benefit from this framework and the conversions between representations could be implemented at the GraphicalModels.jl level? |
Considering myself a beginner, MRF doesn't bother me at all, specially because that's how Wikipedia first defines it (so I praise the consistency). If I landed on a Julia BN or MRF package today for the very first time, what would really help is the domain-specific language proposed by Dahua Lin, which I think goes along with your discussion point of a top-level defined PGM interface. |
... or JuMP.jl for the matter of DSL, considered the 'jewel' of Julia. There is still Deep BN, Deep MRF, and Deep MLN that can be built on top of the work (or platform?) you guys are doing (and I hope we), so it all adds up. |
I am not sure we need a domain-specific language at this point. I think the interface would be more along the lines of the POMDPs.jl top-level module, which defines functions but does not implement them. If one of you has something in mind for the DSL we could discuss it though. Hmm. I don't think the top level would have access to either BayesNets.jl or MarkovNets.jl, so defining conversions there might be tricky. That being said, defining conversions within each package would be tricky too. Maybe a PGMUtils package or similar? I am not really happy with that either. It would like to have a working release of the BayesNets before Spring quarter. Maybe we should decide what can be completed before then and what should be done at a later time? |
Sounds good to me Tim. I am reviewing every line of your notebook and code in general to see how and if I can jump in. So how would the super-type and file structure look like? Why would you need a super-type? Perhaps I could work on the active trail function? |
@tawheeler agreed, DSL not on the table at this point. Ok to make a list of most important items to complete before spring Q and start working on it. Should we discuss in this issue or elsewhere? |
It'd be great to meet in person. I'll email you. |
I created the @hamzaelsaawy We would like to use your Factors.jl as well. The current plan is:
|
created an empty MarkovNets.jl - will start working on filling it out next week! @hpoit it is normal you can't access MRF unless you checked out the 'graphs' branch from my fork of BayesNets. |
Thanks Henri. How do I |
Note to posterity: |
Will |
@hpoit shoot me an email and I'll walk you through it. first name dot palacci at gmail. |
I fixed ProbabilsiticGraphicalModels.jl and BayesNets.jl (master branch) so that they are compatible. All tests pass. |
Any update on the PGM package and related implementation packages? It would be nice to have something like pgmpy in Julia 💯 |
Hi all!
I've been working with the library for the past couple days and am finding it very useful!
A feature that I would love seeing is the ability to convert easily between Bayesian Network representations to factor graphs or Markov Random Fields. The conversions are not computationally intensive and can sometimes allow to solve certain problems more elegantly (for ex LBP on MRFs only has one type of message rather than Pi and Lambda messages).
Let me know if that is of interest to you and I would happily start working on a PR
The text was updated successfully, but these errors were encountered: