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 numerical issues inside p-value computation #9

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

zietzm
Copy link
Member

@zietzm zietzm commented Nov 7, 2023

Have been getting inf negative log p-values where the correct numbers are reasonable (e.g. 60). This is because the computation involves direct p-values that are then log transformed. This doesn't give us any numerical stability benefits.

This is not a full solution. It just fixes some floating point issues.

Would be ideal to have a C++ version of scipy.stats.distributions.t.logsf, in which the log p-value is computed entirely in log space to avoid over/underflow before the log is applied.

@zietzm zietzm merged commit 6fd3fdb into tatonetti-lab:master Nov 7, 2023
1 check passed
@zietzm zietzm deleted the pvalue branch November 7, 2023 19:28
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