Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix excess for given significance computation #1289
Adapt test_sensitivity; do the root finding of Lima formula with its square and make it working for requested significance close to 0; and add a check that we look for positive significance.
@cdeil - Please check the negative excess handling and if this really works for arrays.
I've attached a commit here ( 4d0f8a4 ) that (hopefully) improves the tests and code in
The implementation is also changed a bit compared to what @oscarblanchbigas you put - after thinking a bit about it, the case that really needs to be special-handled is
I think this is working, and all that's missing here is to adjust the test to have reference value NaN for those "impossible cases".
But I wanted to ask for some feedback / review here concerning this thinking and the new implementation. Is it correct? Is it numerically stable for all cases? Can it be written in a better way (using Python/numpy/scipy only, without going to Cython or Numba)? @oscarblanchbigas @mackaiver @kosack @adonath - if you have time, please have a look.
The idea would be to update