Closed seshnadathur closed 3 years ago
What exact value does your log-likelihood return when evaluated in one such point? Is it np.nan?
I'm not sure: as I couldn't find the parameter values at which the failure occurred it is not so simple to reproduce it. If I come across it again I will check and let you know. Does it affect the fix you would need to implement?
I should add that the running a chain with the exact same likelihood using emcee
I hit a (probably similar) failure point, and emcee
spat out the parameter values at that point. This was useful for me to code a workaround in the likelihood (which also now means that failure doesn't recur, so it's less easy to answer your question).
I think I know what you mean. It's not when the likelihood returns an invalid value (e.g. np.nan) but when the likelihood raises an exception.
Could you confirm that the error message emcee provided looked like this?
emcee: Exception while calling your likelihood function:
params: [-2.85976993 5.04287664]
args: []
kwargs: {}
exception:
Yes, that's right. Sorry about the confusing wording earlier!
No worries. I'l implement it during the next few days.
Sorry for the delay. Let me know if the feature works.
I am working with a problem where some points in parameter space give invalid inputs for which my likelihood fails. When this happens, I would like
zeus
to print the parameter values at the point that caused the failure (as is done byemcee
) to make it easier to debug/understand the physical reason for the likelihood failure.Can you implement this please?