netZooPy icon indicating copy to clipboard operation
netZooPy copied to clipboard

DRAGON- Ambiguous exception thrown during calculation of p-values

Open blawney opened this issue 2 years ago • 4 comments

The estimate_p_values_dragon function is raising an exception stating "f(a) and f(b) must have different signs"

blawney avatar Dec 18 '23 16:12 blawney

Hey @blawney, I am tagging @katehoffshutta for help, she may need a working example but I did get this issue before https://github.com/netZoo/netZooPy/issues/298

marouenbg avatar Dec 18 '23 20:12 marouenbg

Thanks @marouenbg @blawney! @marouenbg no working example needed, I asked @blawney to raise this so we can correct the ambiguity of the exception.

As Marouen mentioned, the problem and fix(workaround) are described in detail in #298. The remaining issue is that we need to add an informative exception so that instead of seeing "f(a) and f(b) must have different signs", the user is given a description of the issue and suggested to use the MC p-value calculation rather than the parametric version.

I will get started on this!

katehoffshutta avatar Dec 19 '23 10:12 katehoffshutta

Outside of the exception mentioned above, is the current recommended solution to catch the exception from the estimate_p_values_dragon and then subsequently fall back to estimate_p_values_mc with the same function arguments?

blawney avatar Dec 19 '23 15:12 blawney

Currently I am not planning to implement the default as fall back to estimate_p_values_mc at this point because it is somewhat time-consuming. We could provide the user an estimated run time for the MC calculation in the exception, I think, based on the size of their dataset.

That said, we are working on algorithmic improvements and parallelization and once those are in place, I think it would make sense to redirect as you describe above.

katehoffshutta avatar Dec 19 '23 19:12 katehoffshutta