Closed jaeckdaniel closed 3 years ago
Hi Max,
thanks so much for setting up such a great library with a very clean and concise API!
I have a quick question regarding the posterior probabilities of the Asia network example:
Asia
If I select Dispnea as query variable and no event variables in your demo app, I get the following posterior probabilities:
Dispnea
Dispnea P(Dispnea) 0 0.5640 1 0.4360
These are also the values that you see in other sources using the Asia example (e.g., Bayes Server or Netica)
If I run the following code in Python (3.9.2), I get the following posterior probabilities for the Dispnea node:
3.9.2
>>> import hedgehog as hh >>> bn = hh.examples.asia() >>> bn.query("Dispnea", event={}) Dispnea False 0.602547 True 0.397453 Name: P(Dispnea), dtype: float64
Do you know what is causing these differences, or am I using the API incorrectly?
Thanks a lot! Daniel
Good catch! I had introduced a typo when tidying the probability tables. It's fixed now. Cheers!
Thanks so much for the quick fix, @MaxHalford . Cheers!
Hi Max,
thanks so much for setting up such a great library with a very clean and concise API!
I have a quick question regarding the posterior probabilities of the
Asia
network example:If I select
Dispnea
as query variable and no event variables in your demo app, I get the following posterior probabilities:These are also the values that you see in other sources using the
Asia
example (e.g., Bayes Server or Netica)If I run the following code in Python (
3.9.2
), I get the following posterior probabilities for theDispnea
node:Do you know what is causing these differences, or am I using the API incorrectly?
Thanks a lot! Daniel