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

Dsfdr numpy fix #312

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

Dsfdr numpy fix #312

wants to merge 2 commits into from

Conversation

amnona
Copy link
Collaborator

@amnona amnona commented Dec 25, 2024

There is a problem with the matrix multiplication used for for the fast mean calculation in dsFDR (using the default method='meandiff'). This results in small (1E-9) differences in means that should be the same. This problem is then propagated to the dsFDR calculation (that relies on exact equality for the ranking), which eventually leads to dsFDR not ignoring enough the features present in a very small number of samples (i.e. reducing the power).
To fix this, we normalize and round the means to 9 decimal points before performing the dsFDR routine.
Also added a new test to validate the correctness by comparing to the slower (and more exact) method=ca.dsfdr.meandiff

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.

1 participant