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

multiple conditions at the end of query not implemented #65

Open
feste opened this issue Jun 30, 2014 · 0 comments
Open

multiple conditions at the end of query not implemented #65

feste opened this issue Jun 30, 2014 · 0 comments
Assignees
Labels

Comments

@feste
Copy link
Contributor

feste commented Jun 30, 2014

Sorry, I should have put this issue up in webchurch instead of chapters...

When there are multiple conditions at the end of a query, the penultimate condition gets interpreted as the QUD rather than as an additional condition. (In the newest version of webchurch this is what happens. In the old (chapters) version, something else entirely happens that I don't quite understand.)

Here's a code example (In "Patterns of Inference" in chapters)

(define observed-luminance 3.0)

(define samples
(mh-query
1000 10

(define reflectance (gaussian 1 1))
(define illumination (gaussian 3 0.5))
(define luminance (* reflectance illumination))

reflectance

(condition (= luminance (gaussian observed-luminance 0.1)))
(condition (= illumination (gaussian 0.5  0.1)))))
(multiviz "Mean reflectance: " (mean samples)
(hist samples "Reflectance"))

If you replace the two conditions with "and" it gets interpreted correctly (although in this case, the probabilities are so low, I haven't gotten it to complete).

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

No branches or pull requests

2 participants