[ENH]: Further Aggregation methods for SphereAggregation Marker #102
No reviewers
Labels
No labels
CRITICAL
Stale
WIP
bug
concept
coordinate
dataset
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
maintenance
maps
marker
mask
on hold
parcellation
preprocess
question
ready
storage
template-space
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
juaml/junifer!102
Loading…
Reference in a new issue
No description provided.
Delete branch "update/custom-sphere-aggregation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Are you requiring a new dataset or marker?
Which feature do you want to include?
Requesting this as per:
in https://github.com/juaml/junifer/blob/main/junifer/markers/sphere_aggregation.py.
I think it would be very useful if one can pass a function or name of function to the SphereAggregation Marker (other than 'mean').
This would be directly relevant for #36, as one could then simply define a kendalls_w function that can be passed as an aggregation method to SphereAggregation, which would give the reho value for that Sphere (if I understand this correctly).
How do you imagine this integrated in junifer?
I had a very quick look at nilearn and here is how they do it in a nutshell:
(from:
github.com/nilearn/nilearn@98a3ee060/nilearn/maskers/nifti_spheres_masker.py (L206))I guess we should be able to do something similar simply by importing _iter_signals_from_spheres and using a function otther than np.mean() (again, only if I understand this correctly.)
Do you have a sample code that implements this outside of junifer?
Anything else to say?
No response
The problem is exactly this:
That is a scikit-learn
_method, so private and might change in the future without warning. We need to avoid that to the max!We'll find a solution.
_iter_signals_from_spheres:
(
github.com/nilearn/nilearn@98a3ee060b/nilearn/maskers/nifti_spheres_masker.py (L152))_apply_mask_and_get_affinity:
(
github.com/nilearn/nilearn@98a3ee060b/nilearn/maskers/nifti_spheres_masker.py (L25))Codecov Report
100.00% <ø> (ø)92.20% <100.00%> (+0.13%)Flags with carried forward coverage won't be shown. Click here to find out more.
100.00% <ø> (ø)100.00% <100.00%> (ø)100.00% <100.00%> (ø)97.67% <100.00%> (ø)@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Is this code from Nilearn? If so, can you adjust the license/info on this file to reflect that?
@ -0,0 +1,334 @@"""Provide tests for JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Same here, how much is it nilearn's code?
@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Yeah from nilearn, okay will add the information.
@ -0,0 +1,334 @@"""Provide tests for JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>The whole of it. I removed the tests for
inverse_transform.@ -0,0 +1,334 @@"""Provide tests for JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>then keep nilearn's header then.
@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Okay two doubts:
@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>github.com/nilearn/nilearn@98a3ee060b/LICENSE (L4-L35)@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>You mean make it nilearn style?
They have BSD but I get your point.
@ -0,0 +1,334 @@"""Provide tests for JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>This will also need the license, I believe?
@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Shouldn't it be the latest license? Licensing is always tricky.
@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Make them our style
No, the first is nilearn license. The rest are software incorporated in nilearn.
@ -0,0 +1,334 @@"""Provide tests for JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>Yes.
@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>I meant that the link you referenced has
2007-2015and the one I referenced has2007-2022. So, should we go for the new one?@ -0,0 +1,290 @@"""Provide JuniferNiftiSpheresMasker class."""# Authors: Synchon Mandal <s.mandal@fz-juelich.de>check the main branch: https://github.com/nilearn/nilearn/blob/main/LICENSE