Skip to content
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

Inconsistent results #1

Open
kravietz opened this issue Feb 4, 2013 · 2 comments
Open

Inconsistent results #1

kravietz opened this issue Feb 4, 2013 · 2 comments

Comments

@kravietz
Copy link

kravietz commented Feb 4, 2013

Hi, I've tried using this version of OpenBayes but it gives results inconsisent with what other BBN implementations return. For example, results for the Asia example in OpenBayes are:

Probability of Lung Cancer given Bronchitis and Smoking:
Multinomial Distribution for node : Lung Cancer
Conditional Probability Table (CPT) :
array([ 1., 0.], dtype=float32)
Probability of an Abnormal XRay given Smoking:
Multinomial Distribution for node : X-Ray Result
Conditional Probability Table (CPT) :
array([ 0.20248756, 0.79751241], dtype=float32)
Probability of Dyspnea given a Visit to Asia:
Multinomial Distribution for node : Dyspnea
Conditional Probability Table (CPT) :
array([ 0.5, 0.5], dtype=float32)

Same network in JavaBayes returns different values.

@Ghost99
Copy link

Ghost99 commented May 2, 2013

It can be caused by error in example in line 36 Examples/bn_asia.py

 # B -> D
-network.add_e(DirEdge(len(network.e), visit_to_asia, dyspnea))
+network.add_e(DirEdge(len(network.e), bronchitis, dyspnea))

@willasaywhat
Copy link
Owner

Please submit a pull request, and I'll add this in. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants