juaml / junifer

Forschungszentrum Jülich Neuroimaging Feature Extractor
https://juaml.github.io/junifer
GNU Affero General Public License v3.0
14 stars 13 forks source link

[ENH]: Enable `Marker`s to extract multiple features #349

Closed synchon closed 1 month ago

synchon commented 2 months ago

This PR refactors the internals of BaseMarker to allow for multiple features to be extracted from one marker. It also simplifies creating new markers by replacing multiple methods with a class attribute. For now, ALFF-family and BrainPrint are specifically getting benefited from this.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.51%. Comparing base (1481ed5) to head (5c3e407).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/juaml/junifer/pull/349/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #349 +/- ## ========================================== + Coverage 88.00% 88.51% +0.50% ========================================== Files 114 114 Lines 5137 4937 -200 Branches 999 974 -25 ========================================== - Hits 4521 4370 -151 + Misses 456 413 -43 + Partials 160 154 -6 ``` | [Flag](https://app.codecov.io/gh/juaml/junifer/pull/349/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [docs](https://app.codecov.io/gh/juaml/junifer/pull/349/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | `100.00% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/juaml/junifer/pull/349?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/markers/base.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2Jhc2UucHk=) | `97.50% <ø> (+3.16%)` | :arrow_up: | | [junifer/markers/brainprint.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Fbrainprint.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2JyYWlucHJpbnQucHk=) | `46.77% <ø> (+5.82%)` | :arrow_up: | | [junifer/markers/complexity/complexity\_base.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Fcomplexity%2Fcomplexity_base.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2NvbXBsZXhpdHkvY29tcGxleGl0eV9iYXNlLnB5) | `94.73% <ø> (-1.42%)` | :arrow_down: | | [junifer/markers/ets\_rss.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Fets_rss.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2V0c19yc3MucHk=) | `100.00% <ø> (ø)` | | | [junifer/markers/falff/falff\_base.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Ffalff%2Ffalff_base.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2ZhbGZmL2ZhbGZmX2Jhc2UucHk=) | `70.96% <ø> (+1.40%)` | :arrow_up: | | [junifer/markers/falff/falff\_parcels.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Ffalff%2Ffalff_parcels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2ZhbGZmL2ZhbGZmX3BhcmNlbHMucHk=) | `100.00% <ø> (ø)` | | | [junifer/markers/falff/falff\_spheres.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Ffalff%2Ffalff_spheres.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2ZhbGZmL2ZhbGZmX3NwaGVyZXMucHk=) | `100.00% <ø> (ø)` | | | [...ivity/crossparcellation\_functional\_connectivity.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Ffunctional_connectivity%2Fcrossparcellation_functional_connectivity.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2Z1bmN0aW9uYWxfY29ubmVjdGl2aXR5L2Nyb3NzcGFyY2VsbGF0aW9uX2Z1bmN0aW9uYWxfY29ubmVjdGl2aXR5LnB5) | `100.00% <ø> (ø)` | | | [...nnectivity/edge\_functional\_connectivity\_parcels.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Ffunctional_connectivity%2Fedge_functional_connectivity_parcels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2Z1bmN0aW9uYWxfY29ubmVjdGl2aXR5L2VkZ2VfZnVuY3Rpb25hbF9jb25uZWN0aXZpdHlfcGFyY2Vscy5weQ==) | `100.00% <ø> (ø)` | | | [...nnectivity/edge\_functional\_connectivity\_spheres.py](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree&filepath=junifer%2Fmarkers%2Ffunctional_connectivity%2Fedge_functional_connectivity_spheres.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9tYXJrZXJzL2Z1bmN0aW9uYWxfY29ubmVjdGl2aXR5L2VkZ2VfZnVuY3Rpb25hbF9jb25uZWN0aXZpdHlfc3BoZXJlcy5weQ==) | `88.23% <ø> (-1.77%)` | :arrow_down: | | ... and [12 more](https://app.codecov.io/gh/juaml/junifer/pull/349?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | |