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

[ENH] Allow string expressions for second_level_contrast of non_parametric_inference #4150

Merged
merged 6 commits into from Jan 8, 2024

Conversation

Copy link
Contributor

👋 @ymzayek Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f4b03d4) 91.69% compared to head (834235c) 91.91%.
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4150      +/-   ##
==========================================
+ Coverage   91.69%   91.91%   +0.21%     
==========================================
  Files         144      145       +1     
  Lines       16150    16324     +174     
  Branches     3359     3404      +45     
==========================================
+ Hits        14809    15004     +195     
+ Misses        796      777      -19     
+ Partials      545      543       -2     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.69% <100.00%> (?)
macos-latest_3.11 ?
macos-latest_3.11_test_plotting 91.69% <100.00%> (?)
macos-latest_3.12 ?
macos-latest_3.12_test_plotting 91.69% <100.00%> (?)
macos-latest_3.8_test_plotting 91.65% <100.00%> (?)
macos-latest_3.9 ?
macos-latest_3.9_test_plotting 91.65% <100.00%> (?)
ubuntu-latest_3.10 ?
ubuntu-latest_3.10_test_plotting 91.69% <100.00%> (?)
ubuntu-latest_3.11 ?
ubuntu-latest_3.11_test_plotting 91.69% <100.00%> (?)
ubuntu-latest_3.12 ?
ubuntu-latest_3.12_test_plotting 91.69% <100.00%> (?)
ubuntu-latest_3.12_test_pre 91.69% <100.00%> (?)
ubuntu-latest_3.8_test_min 68.83% <100.00%> (?)
ubuntu-latest_3.8_test_plot_min 91.41% <100.00%> (?)
ubuntu-latest_3.8_test_plotting 91.65% <100.00%> (?)
ubuntu-latest_3.9 ?
ubuntu-latest_3.9_test_plotting 91.65% <100.00%> (?)
windows-latest_3.10 ?
windows-latest_3.10_test_plotting 91.66% <100.00%> (?)
windows-latest_3.11 ?
windows-latest_3.11_test_plotting 91.66% <100.00%> (?)
windows-latest_3.12 ?
windows-latest_3.12_test_plotting 91.66% <100.00%> (?)
windows-latest_3.8_test_plotting 91.62% <100.00%> (?)
windows-latest_3.9 ?
windows-latest_3.9_test_plotting 91.63% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Remi-Gau Remi-Gau self-requested a review December 12, 2023 17:24
Copy link
Collaborator

@Remi-Gau Remi-Gau left a comment

Choose a reason for hiding this comment

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

So far this looks good to me.

Not sure what was causing me issue with this.

@Remi-Gau
Copy link
Collaborator

@bthirion
may be worth checking if we can add tests for some of the edge cases your were mentioning.

@ymzayek
Copy link
Member Author

ymzayek commented Dec 14, 2023

So far this looks good to me.

Not sure what was causing me issue with this.

It took me a while to also come up with a rather simple solution which is why I wasn't confident about it 😅. I was initially was focused on having to change things in permuted_ols but if this makes sense to you and others I don't see a problem with allowing it

@ymzayek ymzayek marked this pull request as ready for review January 2, 2024 12:08
@Remi-Gau Remi-Gau requested a review from bthirion January 8, 2024 09:29
Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

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

All changes LGTM and I don't see whay non binary contrasts would raise issues. This code is better than I thought ;-)

@Remi-Gau Remi-Gau merged commit 91e59cc into nilearn:main Jan 8, 2024
32 checks passed
@ymzayek ymzayek deleted the contrast_str_expression branch January 9, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants