Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] Add new returns to
NiftiLabelsMasker
'stransform
output #3761[ENH] Add new returns to
NiftiLabelsMasker
'stransform
output #3761Changes from all commits
d3dec6d
87edd69
121d14a
63b6b1f
bfc06cd
bdc5d6b
e594a5d
c911019
79f41e0
83d664e
3c03362
ad507f6
6dbf9e8
da32364
d08d15d
c58411e
7627582
ec205dc
bce6b47
1932b5f
27ca550
fc90887
a5f6d47
bc991e8
bf0a8b6
c5247d7
1a265c7
50e57fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
And here since this is a private function we can just add the new return without making part of a tuple
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.
@ymzayek no, the tuple is because
_filter_and_extract
gets only two inputs and we didn't want to change 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.
Ok and not wanting to change
_filter_and_extract
is because it is called by other maskers not dealt with in this PR? I think we can leave it like this for this PR but just noting that it seems reasonable to me to change its return behavior if other maskers will be changed to support returning a masked image as well.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.
@ymzayek yes we have to change it's behavior in future
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.
@mtorabi59
Random question on this PR: why was it chosen for those attributes to have a trailing underscore?
Why couldn't we have:
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.
I think it means that these quantities are estimated, i.e. fit-/data-dependent.
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.
ha. I guess we should probably mention that somewhere in our style guide, because it is clearly not obvious.
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.
It's an sklearn convention, but you're right.
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.
I am fine just pointing to the scikit learn doc: https://scikit-learn.org/stable/developers/develop.html#estimated-attributes