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] Ignore non-significant kappa elbow when no non-significant kappa values exist #760

Merged
merged 7 commits into from
Jul 20, 2021

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Jul 19, 2021

Closes #752. In the ICA decision tree, there is a step where two elbows are calculated: one from all kappa values and one from non-significant kappa values. When there are no non-significant kappa values, this step fails.

Changes proposed in this pull request:

  • Ignore the non-significant kappa value-based elbow when there are no non-significant kappa values. Log a warning about this when it comes up.
  • For any other cases where getelbow or getelbow_cons fail, raise a more informative exception and include in that message a request to open an issue here.
  • Add new smoke test for getelbow and getelbow_cons.

@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #760 (e57dcc7) into main (12f16eb) will increase coverage by 0.08%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #760      +/-   ##
==========================================
+ Coverage   92.83%   92.91%   +0.08%     
==========================================
  Files          27       27              
  Lines        2192     2203      +11     
==========================================
+ Hits         2035     2047      +12     
+ Misses        157      156       -1     
Impacted Files Coverage Δ
tedana/selection/tedica.py 91.61% <77.77%> (-0.96%) ⬇️
tedana/selection/_utils.py 100.00% <100.00%> (+7.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12f16eb...e57dcc7. Read the comment docs.

@tsalo tsalo requested review from handwerkerd and jbteves July 19, 2021 18:54
jbteves
jbteves previously approved these changes Jul 19, 2021
Copy link
Collaborator

@jbteves jbteves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @tsalo ! Thanks in particular for adding tests as well so that this doesn't regress.

handwerkerd
handwerkerd previously approved these changes Jul 19, 2021
Copy link
Member

@handwerkerd handwerkerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning message in the getelbow functions seems a bit more dramatic than necessary, but otherwise fine.
If you feel like changing it, I'd change to "This error happens when a getelbow function is incorrectly called on no components. If you see this message, please open an issue at https://github.com/ME-ICA/tedana/issues with the full traceback and any data necessary to reproduce this error, so that we create additional data checks to prevent this from happening."

@tsalo tsalo dismissed stale reviews from handwerkerd and jbteves via e57dcc7 July 19, 2021 21:34
Copy link
Collaborator

@jbteves jbteves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

getelbow raises uninformative exception when supplied with an empty array
3 participants