Sobol': Handle zero variance edge case#505
Conversation
|
Interesting case. Will you provide a test? This might be an issue with other methods as well. |
|
Yes, will write a test for this. Details are similar if not identical to this one: |
|
Added tests, but open for additional comments. Tests could probably be extended to cover all other methods in the future. |
|
I believe this should be ready for review now. |
tupui
left a comment
There was a problem hiding this comment.
Changes are straightforward and seem fine.
An extra thing to consider could be to have a warning when that happens. That could help some users diagnostic an issue with their modeling.
Only raised for first and second order calculations, but not when bootstrapping
|
Added a warning: The warning is raised when this condition is encountered for first and second order calculations. No warnings are raised when bootstrapping. Would appreciate feedback on whether this message is informative enough. |
As in title - handle cases where there is no variance (e.g., a constant array) but the reported variance is > 0 due to computational error.