-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow utils._subsampling to accept ndarray #20
Conversation
The subsampling is performed across voxels though, right? So would subsampling a flattened SxT array really be equivalent to subsampling an XxYxZxT array? |
Subsampling a flattened array would not be equal to subsampling the original array. This is why the PR doesn't use flattening. |
I would like to check how the original code does the subsampling for 2D. The original GIFT code supports 1D, 2D and 3D data for maPCA. However, we only took the 3D part for What do you guys think? |
The original GIFT implementation has additional if-statements to support 1D and 2D data: https://github.com/trendscenter/gift/blob/8f22c6078071f93bd5972ae37df3742f17631e9f/GroupICATv4.0c/icatb/icatb_estimate_dimension.m#L379-L396 I'm not sure what the advantage would be of translating the GIFT code vs using the proposed slices. |
The slices approach you proposed is much simpler imo. We could check if both approaches do the same and then stick to the slices one for simplicity. |
Codecov Report
@@ Coverage Diff @@
## main #20 +/- ##
==========================================
- Coverage 92.09% 92.01% -0.09%
==========================================
Files 3 3
Lines 291 288 -3
==========================================
- Hits 268 265 -3
Misses 23 23
Continue to review full report at Codecov.
|
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.
Thank you @notZaki !
@tsalo are you okay with merging this PR? |
Sorry for the massive delay! Merging now. |
The current subsampling function only works for 3d arrays. This PR allows it to work for arbitrary number of dimensions and brings us closer to supporting 2D data as inputs (#5).
Notes: