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

IncosistentEvidenceError for NaiveBayesClassifier #117

Closed
Zarach opened this issue Jun 4, 2024 · 2 comments
Closed

IncosistentEvidenceError for NaiveBayesClassifier #117

Zarach opened this issue Jun 4, 2024 · 2 comments

Comments

@Zarach
Copy link

Zarach commented Jun 4, 2024

Hello Problog Team,

is it correct that the following program throws an inconsistent evidence error?

0.5::topic(t1).
0.5::topic(t2).

1.0::word(w1) :- topic(t1).
0.0::word(w2) :- topic(t1).
0.5::word(w3) :- topic(t1).
0.5::word(w4) :- topic(t1).

0.0::word(w1) :- topic(t2).
1.0::word(w2) :- topic(t2).
0.5::word(w3) :- topic(t2).
0.5::word(w4) :- topic(t2).

evidence(word(w1), false).
evidence(word(w2), false).
evidence(word(w3), true).
evidence(word(w4), true).

query(topic(_)).

@rmanhaeve
Copy link
Contributor

rmanhaeve commented Jun 4, 2024

Yes. word(w1) and word(w2) can only both be false if both topic(t1) and topic(t2) are false. If those are false, word(w3) and word(w4) cannot be true.

@Zarach
Copy link
Author

Zarach commented Jun 4, 2024

Oh, thanks for the fast answer! Only looked at the new added words, sorry...

@Zarach Zarach closed this as completed Jun 4, 2024
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

2 participants