-
Notifications
You must be signed in to change notification settings - Fork 6
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
[BUGFIX] Fix dense barycenter calculations #79
[BUGFIX] Fix dense barycenter calculations #79
Conversation
@@ -181,6 +183,9 @@ def fit( | |||
have the same number of features n_features. | |||
geometry_embedding (np.array or torch.Tensor): Common geometry | |||
embedding of all individuals and barycenter. | |||
subject_weights (list of float, optional): Weights of each individual. |
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.
Naive question: is there really a usecase for this parameter ?
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.
Mostly for interpolation:
https://pythonot.github.io/auto_examples/gromov/plot_gromov_barycenter.html
In our fMRI application, all subjects are assigned the same weight. However other FUGW users might do fancier things...
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.
I removed it since there is no immediate usecase where it could be relevant for the end user.
_, | ||
_, | ||
_, | ||
) = fugw_barycenter.fit( |
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.
AN old traidiotn of sklearn is that fit() return the object itself.
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.
I'd prefer to merge this PR first and open another one to fix this.
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.
LGTM, thx.
Solves #58, #77 and #78.
Adds a new set of tests against POT and in the identity case. Fixes the barycenter weight mix-up issue in the dense case.
It might be worth opening another PR for the sparse case.