netZoo / netZooPy

netZooPy is a network biology package implemented in Python.
https://netzoo.github.io/
GNU General Public License v3.0
78 stars 35 forks source link

DRAGON- Ambiguous exception thrown during calculation of p-values #334

Open blawney opened 10 months ago

blawney commented 10 months ago

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

marouenbg commented 10 months ago

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

katehoffshutta commented 10 months ago

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!

blawney commented 10 months ago

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?

katehoffshutta commented 10 months ago

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.