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
[DOC] Combine similar two-runs GLM examples #3191
Conversation
👋 @tsalo 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.
We will review it as quick as possible, feel free to ping us with questions if needed. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3191 +/- ##
==========================================
- Coverage 92.09% 92.00% -0.10%
==========================================
Files 144 144
Lines 16366 16389 +23
Branches 3426 3431 +5
==========================================
+ Hits 15073 15078 +5
- Misses 754 767 +13
- Partials 539 544 +5 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thx !
I think we can still improve a little bit.
@tsalo do you want me to take over or do you prefer to wrap it up? |
#3203 needs a bit of love, but I'm willing to finish it. Thx for the remainder ! |
@tsalo am taking over this PR before it drifts too far |
@Remi-Gau thanks for taking over. Sorry I didn't get around to it back in September. |
No worries at all. |
To probably tackle in a separate PR but it seems that the contrast matric plotting function gives weird results when it is given unpadded contrast matrices. |
LGTM, but the docu build seems broken. |
TODO:
|
@Remi-Gau I thought the only issue was that |
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.
LGTM otherwise, thx !
@@ -409,6 +403,54 @@ def plot_contrast_matrix( | |||
return ax | |||
|
|||
|
|||
def pad_contrast_matrix(contrast_def, design_matrix): |
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.
Added to fix #4211 in this PR to have valid glm reports in this example
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.
Can extract in separate PR if needed.
contrast_def : :obj:`str` or :class:`numpy.ndarray` of shape[1] <= n_col \ | ||
where ``n_col`` is the number of columns of the design matrix. | ||
The string can be a formula compatible | ||
with :meth:`pandas.DataFrame.eval`. | ||
Basically one can use the name of the conditions | ||
as they appear in the design matrix of the fitted model | ||
combined with operators +- | ||
and combined with numbers with operators +-`*`/. |
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.
as far as I can tell the code in this function cannot handle list of strings or list of arrays as inputs
Adding a report of the outputs before and after: could not spot any difference. |
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.
@Remi-Gau thanks it's looking good! Some minor comments
doc/references.bib
Outdated
@@ -180,6 +180,17 @@ @article{Craddock2012 | |||
year = {2012} | |||
} | |||
|
|||
@article{dehaene2006functional, |
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.
since we alphabetized this list this should move to after Davidson2004
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.
good catch
thanks!!!
Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>
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.
Many improvements in one PR, thx !
Closes #2771
Closes #4211
Changes proposed in this pull request:
run
instead ofsession