Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for masked array bug, and change sig_ml to tiny value #27

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jpkrooney
Copy link
Contributor

Hi Greg,

I'm suggesting two edits with this PR:

  1. To intentionally remove the numpy mask from xi in the marginal_p function when the gaussian option is used. By extracting the data explicitly, we can avoid the issue caused by the numpy bug detailed here: BUG (Possible): masked array divide by zero array seems to screen out nan and inf numpy/numpy#18744
  2. Change the value of sig_ml to very small value (e.g. 1e-200). This still avoids the divide by zero issue, but allows biocorex to explore the full parameter space as determined by the data. Note that one side-effect of this is that negative TCS can result on occasion. This happens when the gaussian marginal description on data that is not truly gaussian - for example if a categorical variable is included this can generate a negative TCS. Thus, a negative TCS is an indication that at least some of the variables in the data don't have a gaussian distribution.

It would be great if you could try to code on datasets you know well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants