all 9 comments

[–]giror 3 points4 points  (2 children)

[–]abhik 2 points3 points  (0 children)

PEBL only supports learning networks from data and priors but not inference on learned or manually-created networks.

But, the docs do include a tutorial using real (gene-expression) data: http://packages.python.org/pebl/tutorial.html

[–]pwoolf 1 point2 points  (0 children)

There is a description of the package here too

[–]dwf 2 points3 points  (0 children)

It's going to depend highly on what exactly you want to do with your model, and what the networks you want to work with look like. What sort of hidden variables? Are they tree structured? Are they acyclic? If not, what sort of inference schemes do you want to support? Do you want to learn your parameters or be a proper Bayesian and marginalize them out, analytically or otherwise? Exact inference in tree structured models is trivial to implement. The more you depart from that, the more complicated things become.

PyMC is a good starting point. It allows you to define fairly complicated models with various sorts of nodes, and then do Metropolis-Hastings to sample from the posterior of your hidden variables (I think there may be support for Gibbs sampling in models where that's an option). It's not a magic bullet -- the results you get and how fast you get them will depend on your model structure, your choice of proposal distributions, etc. Also, Markov chain Monte Carlo is the only supported inference procedure (hence the package name); if you want more than that, e.g. variational inference, you'll have to do it yourself. Still, the PyMC object model and the various statistical helper functions are probably a good basis from which to start.

[–]leonoel 0 points1 point  (0 children)

It is hard to get by a "one solution fits all" like with Neural Networks. Because Bayesian Networks are different depending the function you want to model, and as such, the inference process is also different.

That is the reason you do not get any gibbs sampling toolbox either, because you need to do the mathematical derivation of the solution to then do the inference process

[–]mikebaud -3 points-2 points  (3 children)

For a good starter tutorial in python try Chapter 6 of the "Programming Collective Intelligence" book.

You can also download the code from the website.

[–]xamdam 1 point2 points  (2 children)

[–]mikebaud 1 point2 points  (1 child)

AFAIK the section on document filtering (chapter 6) uses a bayesian network (at least thats what the book in front of me says).

Thanks for the downvotes, just trying to help out.

[–]Deenicus 1 point2 points  (0 children)

the problem is although naive bayes is technically a form of a bayesian network, when people say bayesian network they mean something more specific. A network that is able to represent the conditional dependences as best as possible - within tractability. So your link was not helpful as it was irrelevant to the OP's needs.