-
Notifications
You must be signed in to change notification settings - Fork 7
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
Unified preprocessing for masking and parcellating #103
base: main
Are you sure you want to change the base?
Conversation
…ta transformation
…line Preprocessor class
…retrieval methods
…parcellation process
…/testing datasets
…/testing datasets
Is it ready for review ? |
Apart from some docstrings that need updating, I think it's ready for review. |
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.
Still wondering about the necessity of the class (to be discussed)/
Docstrings should be a bit richer.
|
||
Parameters | ||
---------- | ||
data: np.ndarray |
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.
2D ? 3D ? meaning of the dimensions ?
from nilearn.masking import apply_mask_fmri, intersect_masks | ||
from nilearn.regions.parcellations import Parcellations | ||
|
||
|
||
class ParceledData: |
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'm wondering about the usefulness of this class:
- it does not follow sklearn API: fit method etc.
- it is mostly a container, without internal state: do we need a class ?
How different is it from LabelsMasker ?
+ "Its intersection with the clustering was used instead." | ||
) | ||
|
||
def _one_parcellation(self, imgs): |
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.
Please add 1-line docstrings for private methods, full dosctrings for public methods.
from fmralign.tests.utils import random_niimg | ||
|
||
|
||
def test_init_default_params(): |
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.
1-line docstrings for tests is very helpful for test mainetnance...
_make_parcellation(img, clustering_method, n_pieces, masker) | ||
|
||
|
||
def test_initialization(): |
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.
1-line docsrtings welcome too...
Solves #89. Creates a common preprocessing backend to be used with
PairwiseAlignment
andTemplateAlignment
. Automatically masks and parcellates any number of nifti images in the spirit of scikit-learn'sStandardScaler
. Suggestions for better class name are welcome!Goals:
PairwiseAlignment
TemplateAlignment
fastsrm