-
Notifications
You must be signed in to change notification settings - Fork 2
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: bug in compute_transition_probabilities #159
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #159 +/- ##
==========================================
- Coverage 81.78% 81.78% -0.01%
==========================================
Files 121 121
Lines 6787 6795 +8
==========================================
+ Hits 5551 5557 +6
- Misses 1236 1238 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only comment is how did you discover this? Can you in this case include maybe a test to collect this knowledge that needs to always pass?
I discovered it when creating the local G tutorial for Python because the p-values didn't match with R. These things are quite difficult to detect which is why I think it's so important that more people play around with the method in their analysis. I will add a test! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
The transition probabilities are invalid at k > 1 in
compute_transition_probabilities
which can influence the computation of local G scores. This PR contains a fix for this bug along with some additional minor fixes:Changes
W_out
matrix after matrix power computationuse_weights=False
to match R implementationnormalize_counts=False
as default to match R implementationFixes: exe-1867
Type of change
Please delete options that are not relevant.
PR checklist: