-
Notifications
You must be signed in to change notification settings - Fork 430
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
Probability function returned NaN #415
Comments
I'm not too sure what to say here. There isn't any real reason why emcee would cause different behavior with your interpolator - it just directly calls the function you provide: Line 489 in afba7a5
Some thoughts:
|
Thank you very much for your answer. I'll try your suggestions and let you know. |
Hi, I was wondering if there are any updates on this issue? |
Good morning,
I have an issue on
emcee
. TheEnsembleSampler
crashes after a few iterations and raises aValueError: Probability function returned NaN
. The thing is my user-defined probability function cannot return NaNs, as it defined something like this:where
logP
is basically an evaluation of a beforehand-constructed RBF interpolator.I call the
EnsembleSampler
like this:Changing the
logP
function to e.g. a nearest interpolator solves the problem, so I guess the issue comes from a bad interaction betweenemcee
andscipy
's RBF interpolator?I tried advancing the MCMC iteration by iteration and comparing at each step the manual and
emcee
-stored evaluation of the probability function:and at some point,
diff
was not identically zero, meaning thatmy_probability_function
sometimes returns different results depending on if one evaluates it outside or insideemcee
!Can you help me please? Unfortunately, I was not able to replicate the problem in a minimalist example, as it only emerges when the RBF interpolator is constructed on my personal 2M data points in 7 dimensions.
Many thanks in advance.
The text was updated successfully, but these errors were encountered: