-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
MAP's fmin is unconstrained and breaks nodes by walking outside the support. #47
Comments
Hi Thomas, Can you post a simple example with which we can debug the problem? Thanks, |
Example code : Output: |
Also, as you can see, Uniform returns a very big negative number outside the support instead of -infinity. |
Just noticed that the problem only exists when setting verbose=1 in MAP.fit(). If this it not done, the exception is not raised (or ignored?). However, when running with verbose=0, it will happily find the parameter value t=-5 (i.e. outside the support). So it seems that MAP then ignores any distribution parameters of non-observed variables. Is this intended behavior? |
That big negative number comes from FORTRAN, which is where all of our log-probabilities are calculated. It serves the same purpose as -inf. I think the problem here is simply that logp is calculated simply for reporting, and because the value of t is outside the support, an exception is raised, which is the appropriate behavior for MCMC, but not here. I will fix this. |
Fixed in 8423d05 |
Hi,
I found it very useful to just use the MAP for complex models during model exploration. However, I'm having the problem that fmin sometimes explores parameter spaces outside the support of my distributions (Uniform). In this case, rather than return -Inf, they raise an exception. I'm not sure what the best way would be to fix it, but in this case I think this behavior makes no sense, so either MAP should ignore out-side-of-support-errors or the nodes should have a flag not to raise that error.
Thanks,
Thomas
The text was updated successfully, but these errors were encountered: