Skip to content
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

[ENH] Add fastSRM functionality #70

Merged
merged 9 commits into from
Jan 23, 2024
Merged

Conversation

emdupre
Copy link
Collaborator

@emdupre emdupre commented Sep 5, 2023

Supersedes #50

@emdupre
Copy link
Collaborator Author

emdupre commented Sep 7, 2023

Opened hugorichard/FastSRM#6 for fastSRM package deprecations !

@bthirion
Copy link
Contributor

bthirion commented Sep 8, 2023

LMK when you want a review.

@emdupre
Copy link
Collaborator Author

emdupre commented Sep 8, 2023

@bthirion I think this is now ready ! I've kept the existing PR mostly as-is (just dealing with build and deprecation issues), so would be good to go over it. Will also review myself !

@emdupre
Copy link
Collaborator Author

emdupre commented Sep 8, 2023

@thomasbazeille I'm guessing you don't have time / interest to review, but your input is also always welcome ! 🤗

Copy link
Contributor

@bthirion bthirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm realizing that I'm confused. Are these modules dedicated to SRM specifically or can they be used with other estimators ?


reshaped_aligned =

!!!Not implemented for n_bags>1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we worry about that ? Issue a warning ?


Parameters
----------
X_i: ndarray
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring does not march the signature here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was pulled from the existing fit_one_piece, which is maybe another plus for integrating it there. Noting that we'll also need to handle Identity differently or we'll have overloaded params.


def fit_one_parcellation(
X_list,
srm,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignment_method ?


def __init__(
self,
srm,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignment_method ?

@emdupre
Copy link
Collaborator Author

emdupre commented Sep 11, 2023

I'm realizing that I'm confused. Are these modules dedicated to SRM specifically or can they be used with other estimators ?

I believe these can only be used with SRM, since SRM is a group-level method so we have to handle training data differently.

There is already a fit_one_piece method and (non-overlapping, but similarly named) generate_Xi_Yi functions in pairwise_alignment, which might cause user confusion, though.

One option is to add another elif here, and rename then call out to the fit_one_piece function included here.

@emdupre
Copy link
Collaborator Author

emdupre commented Oct 5, 2023

@bthirion I've gone through and patched up the obviously outdated docstrings ; I'm thinking to leave the reorg to another PR, though, just to get the initial code in. WDYT ?

@emdupre
Copy link
Collaborator Author

emdupre commented Jan 19, 2024

OK, I'm worried that this is now blocking #74 (as we patch dependencies for both nilearn and fastsrm here), so I'd like to get this merged in. Similar to the discussion there, this has SRM in a standalone module.

Please let me know, @bthirion and @denisfouchard, if you have any concerns with merging this ! If I don't hear otherwise, I'll plan to merge early next week.

@bthirion
Copy link
Contributor

LGTM. @denisfouchard please voice your opinion.

@denisfouchard
Copy link
Collaborator

No problems, as SRM is independent from my work. I presume that FastSRM being a more "reputable" package it is ok to keep it standalone.

How about fugw btw ? Would it be nice to integrate it to compare to basic OT method ? Maybe @alexisthual ?

@emdupre
Copy link
Collaborator Author

emdupre commented Jan 23, 2024

Thanks, both !

I'm going to go ahead and merge this then, but I opened a new issue with your comment re : fugw so it's not lost ! We can continue the discussion there 🙂

@emdupre emdupre merged commit a5427d0 into Parietal-INRIA:main Jan 23, 2024
4 checks passed
@emdupre emdupre mentioned this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants