-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support TFCE thresholding in CBMA algorithms #655
Conversation
Codecov Report
@@ Coverage Diff @@
## main #655 +/- ##
==========================================
+ Coverage 85.28% 85.53% +0.24%
==========================================
Files 40 40
Lines 4513 4589 +76
==========================================
+ Hits 3849 3925 +76
Misses 664 664
Continue to review full report at Codecov.
|
Actually not going to touch IBMA any time soon. |
One question I have is whether the maximum statistic null distributions should be separated by sign for two-sided tests. For example, for the MKDAChi2, which can have positive and negative chi-squared values, should we retain maximum negative cluster size and maximum positive cluster size distributions separately? I'm thinking about this primarily because of what I read in Albajes-Eizagirre et al. (2019):
|
It's super slow and there's no chance we can get an example running fast enough.
corr = FWECorrector(method="montecarlo", n_iters=5, n_cores=1) | ||
corr = FWECorrector(method="montecarlo", n_iters=5, n_cores=1, tfce=True) |
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.
This test now takes ~90 seconds locally. 😬
relevant publication from Simons group: https://pubmed.ncbi.nlm.nih.gov/35535616/ |
Thanks! I knew Simon was working on TFCE in ALE, but I didn't realize there was a paper out already. Based on the abstract, it may not be worth it to merge this PR, but on the other hand I do want NiMARE to be useable for that kind of study in the future... |
I'm thinking that maybe I should close this PR, but also open a separate one that adds a note to the documentation about TFCE and points to this one. That way, if someone does want to use TFCE in NiMARE, they can refer to code that (at least at one point) worked, and they'll also see why we chose not to integrate it into the package. I am also hopeful that we will be able to implement a much faster probabilistic TFCE in the future (like MNE), and that approach might not have the same issues noted in Simon's paper. |
Closes #145.
Changes proposed in this pull request:
tfce
option toCBMAEstimator.correct_fwe_montecarlo
that calculates TFCE-based FWE corrected maps.tfce
option toMKDAChi2.correct_fwe_montecarlo
as well.nimare.meta.utils.calculate_tfce
, which calculates TFCE on a 3D numpy array.