jmschrei / pomegranate

Fast, flexible and easy to use probabilistic modelling in Python.
http://pomegranate.readthedocs.org/en/latest/
MIT License
3.36k stars 587 forks source link

Bayesian Networks - Gaussian/Continuous conditional probability #831

Closed JuanCarlosCamara closed 3 years ago

JuanCarlosCamara commented 4 years ago

Hello, I´m trying to implement a Bayesian Network which needs to model some conditional variables as gaussians. I´m checking the documentation but I don´t find the way to do it, it seems the only guidance is to create discrete distributions and ConditionalProbabilityTables with discrete variables.

I have tried different ways to do it, por example creating Gaussian distribution with mean and variance values and joining them with IndependentComponentsDistribution class, but it seems this class does not have a keys function (which actually does not have, at least is not there in the documentation). Probably I´m using this class wrong...

I would appreciate any guidance you could provide. Best regards, Juan Carlos Cámara

jmschrei commented 4 years ago

Howdy Juan

Unfortunately, pomegranate does not implement Bayesian networks with continuous emissions. It was something I really wanted to add in a few years ago but never quite had the time.

JuanCarlosCamara commented 4 years ago

Thanks a lot for your answer.

Are you thinking in implementing it in the future? If not, do you know any other library I could use for it? I tried pybbn (not sure if pybbn does have continuos emissions), but pomegranate has far away better predict timing performance and that´s the reason I would prefer keep using it.

Best regards, Juan Carlos Cámara

pabloazurduy commented 3 years ago

Hi guys, does anybody know why there is no continuous Bayesian network implementation around there? I've also tried with causalnex but also it's only a discrete implementation, I'm wondering if that might be a technical limitation.

I remember being at a conference of the creator of pomegranate (3.5 years ago) and I remember something like "continuous variables were not implemented yet in pomegranate" but I got the idea that it will be implemented in a near future... but I might misunderstand. EDIT I've just realized that @jmschrei is on this topic hahahhahahah. Is there a technical limitation on the implementation of continuous variables? you know this way better than me.

Anyway, if someone has more info I would really appreciate it. Thanks

jmschrei commented 3 years ago

Howdy. The gist is that coding continuous BNs is much more difficult than the discrete case. I didn't realize how much of a pain it was going to be to add them in, and then my pomegranate development time got eaten up by other projects and research. Sorry about that.

On Wed, Jan 27, 2021 at 6:05 AM pabloazurduy notifications@github.com wrote:

Hi guys, does anybody know why there is no continuous Bayesian network implementation around there? I've also tried with causalnex https://github.com/quantumblacklabs/causalnex but also it's only a discrete implementation, I'm wondering if that might be a technical limitation.

I remember being at a conference of the creator of pomegranate (3.5 years ago) and I remember something like "continuous variables were not implemented yet in pomegranate" but I got the idea that it will be implemented in a near future... but I might misunderstand.

Anyway, if someone has more info I would really appreciate it. Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jmschrei/pomegranate/issues/831#issuecomment-768307478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA54IECUPUWNK66ZPIF2MH3S4AMSPANCNFSM4S3NBFFQ .