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

Log can succeed on distributions with probability mass less than 0 #304

Closed
Tracked by #275
Hazelfire opened this issue Apr 16, 2022 · 1 comment · Fixed by #345
Closed
Tracked by #275

Log can succeed on distributions with probability mass less than 0 #304

Hazelfire opened this issue Apr 16, 2022 · 1 comment · Fixed by #345
Labels
Bug Something isn't working

Comments

@Hazelfire
Copy link
Collaborator

Description:

log should fail on distributions with probability mass lower than 0, for instance log(normal(1, 1))
image

This actually causes issues further down the track, for instance, normalizing one of these invalid distributions ends up with an empty graph:

image

Steps to reproduce:

Using currently 0.2.2 on @quri/squiggle-components on a Squiggle notebook. Just pop the expressions above

Expected behavior:

I would prefer this to error when doing log(normal(1, 1)) rather than continue to that point and fail later.

What I got instead:

It succeeds / fails on normalizing the above expressions

@Hazelfire Hazelfire added the Bug Something isn't working label Apr 16, 2022
@Hazelfire Hazelfire changed the title Log can succeed on distributions with probability mass larger than 0 Log can succeed on distributions with probability mass less than 0 Apr 16, 2022
@OAGr
Copy link
Contributor

OAGr commented Apr 16, 2022

Good find. Makes sense.

@OAGr OAGr mentioned this issue Apr 16, 2022
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
2 participants