Priority: Medium
Issue Description:
The slice sampler can get stuck when encountering NaN values in likelihood calculations. This contributes to the infinite loop problem reported in #20.
Proposed by: @williamjameshandley (Will Handley)
Context: Related to debugging stuck runs with @zwei-beiner (Namu Kroupa) and @yallup (David Yallup)
Proposed Solution:
- Treat NaN likelihood values as
-inf internally for sampler logic
- Preserve the original NaN value for user purposes (logging, debugging, etc.)
- This prevents the sampler from hanging on NaN values while still allowing users to detect when their likelihood function produces NaN
Implementation Details:
- Add NaN detection in likelihood evaluation
- Convert NaN to
-inf for internal sampling decisions
- Maintain separate record of original NaN values for user access
- Consider adding warning/logging when NaN values are encountered
Benefits:
- Robustness: Prevents sampler hangs due to NaN values
- Debugging: Users can still identify when their likelihood produces NaN
- Continuity: Sampling can continue even with occasional NaN evaluations
- Transparency: Clear handling of edge cases in likelihood evaluation
Related Issues:
Priority: Medium
Issue Description:
The slice sampler can get stuck when encountering NaN values in likelihood calculations. This contributes to the infinite loop problem reported in #20.
Proposed by: @williamjameshandley (Will Handley)
Context: Related to debugging stuck runs with @zwei-beiner (Namu Kroupa) and @yallup (David Yallup)
Proposed Solution:
-infinternally for sampler logicImplementation Details:
-inffor internal sampling decisionsBenefits:
Related Issues: