Nilearn: Attribute `components_` is deprecated since 0.4.1 but still here

Created on 4 Jun 2021  路  4Comments  路  Source: nilearn/nilearn

Most helpful comment

note the Decoder & co., for example, have both coef_ and coef_img_. SearchLight has scores_ which is neither an image nor masked data (see #2673), ... maybe we should make a list of all such objects and make this consistent?

I don't see a big disadvantage of having them both, as the Decoder does. to avoid storing them twice the least frequently used one can be implemented as a property

All 4 comments

Actually, I'm not really sure what was intended here. I initially thought that components_ was meant to disapear in favor of components_img_, but I realize it could just be a note to encourage users to rely on components_img_ instead of manually unmasking components_. Does someone knows more on this?

it seems this was done in pr #1536 , and here is the discussion about deprecating components_

also, the transform and inverse_transform of the base decomposition:
https://github.com/nilearn/nilearn/blob/dbbd221e3633c97464034c5366faa548728c9999/nilearn/decomposition/base.py#L458

unmask the components every time; they should rely on self.components_img_; they also create a new mapsmasker every time; this should be done in fit

note the Decoder & co., for example, have both coef_ and coef_img_. SearchLight has scores_ which is neither an image nor masked data (see #2673), ... maybe we should make a list of all such objects and make this consistent?

I don't see a big disadvantage of having them both, as the Decoder does. to avoid storing them twice the least frequently used one can be implemented as a property

Was this page helpful?
0 / 5 - 0 ratings