-
Notifications
You must be signed in to change notification settings - Fork 95
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
[REF] Mean-center design matrix within getcoeffs #365
Conversation
# Conflicts: # tedana/metrics/kundu_fit.py
Codecov Report
@@ Coverage Diff @@
## master #365 +/- ##
===========================================
- Coverage 79.48% 47.33% -32.16%
===========================================
Files 40 39 -1
Lines 2208 2212 +4
===========================================
- Hits 1755 1047 -708
- Misses 453 1165 +712
Continue to review full report at Codecov.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to tedana:tada: ! |
This PR sadly suffers from bloat, so I'm taking the core changes and putting them in a new PR. Closing this one now. |
Closes #179. This is a minor refactor with a couple of diverse changes. It should not impact behavior except for minuscule changes to PCA metrics. I believe that the changes actually reflect a bug fix, but they're so small that I don't think it's worth it to refer to this as a "fix" PR.
Changes proposed in this pull request:
getcoeffs
.add_const
argument fromgetcoeffs
. Add constant automatically instead. This actually is not necessary, because mean-centering the IV matrix results in the same parameter estimates for some reason.getcoeffs
calls.dependence_metrics
from the beginning. We used to create 1D numpy arrays, fill those in, stack them, and then make the DataFrame from the resulting 2D array. This simplifies things.getelbow
to handle empty input arrays. If an input array is empty, return NaN with a warning. Forgetelbow
calls where results are averaged ormin
-ed, usenanmean
ornanmin
instead.