CitrineInformatics/lolo

Merit class UncertaintyCorrelation yields nan for constant predictive uncertainties

mrupp-citrine opened this issue · 0 comments

When calling UncertaintyCorrelation with predictive distributions that have constant uncertainty, value varSigma (line 131 in Merit.scala) is zero, leading to denominator being zero. As the numerator is also zero, not-a-number (nan) is returned.

This behaviour seems undesirable. I suggest throwing an exception to signal the problem instead of silently inserting nan into calculations.