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

[REF] Do not modify mixing matrix with sign-flipping #749

Merged
merged 7 commits into from
Jul 14, 2021

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Jul 12, 2021

Closes #748.

Changes proposed in this pull request:

  • Add new metric, "optimal sign", to component tables.
  • Do not return sign-flipped mixing matrix from metrics.collect.generate_metrics().
  • Write out unmodified mixing matrix in main workflow.
  • Coerce signs to integers rather than floats. This will make the metric values in the component table easier to interpret.

@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #749 (48017e2) into main (d449925) will decrease coverage by 0.01%.
The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #749      +/-   ##
==========================================
- Coverage   92.61%   92.59%   -0.02%     
==========================================
  Files          27       27              
  Lines        2125     2121       -4     
==========================================
- Hits         1968     1964       -4     
  Misses        157      157              
Impacted Files Coverage Δ
tedana/workflows/tedana.py 90.30% <87.50%> (-0.07%) ⬇️
tedana/decomposition/pca.py 86.51% <100.00%> (-0.15%) ⬇️
tedana/metrics/_utils.py 68.00% <100.00%> (+0.65%) ⬆️
tedana/metrics/collect.py 95.00% <100.00%> (-0.09%) ⬇️
tedana/reporting/static_figures.py 97.87% <100.00%> (+0.02%) ⬆️

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 d449925...48017e2. Read the comment docs.

tsalo added 3 commits July 12, 2021 14:31
It's not a big deal, but devs might wonder why the columns in the component table don't match the order hardcoded into generate_metrics.
tedana/decomposition/pca.py Outdated Show resolved Hide resolved
@tsalo tsalo requested review from jbteves and eurunuela July 13, 2021 17:38
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.

This is a great refactor, thanks @tsalo ! Good job cleaning up the logic I had for ordering the table. However, I think it would be good to stick with our save_file interface. Either you can add something to add the component index or I can if you'd prefer.

@tsalo
Copy link
Member Author

tsalo commented Jul 13, 2021

@jbteves thanks for reviewing. I think I was just overcomplicating the TSV saving procedure. If I just keep the "Component" ID column as a column instead of the index, it should be fine.

EDIT: Yup, as of 48017e2 it all looks good.

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 so much @tsalo !

Copy link
Collaborator

@eurunuela eurunuela left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thank you @tsalo ! I'll leave it to you to merge this PR.

@tsalo tsalo merged commit 319bbba into ME-ICA:main Jul 14, 2021
@tsalo tsalo deleted the drop-component-flipping branch July 14, 2021 15:14
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.

Do not modify mixing matrix with sign-flipping
3 participants