alexisthual / fugw

Scalable python GPU solvers for fused unbalanced gromov-wasserstein optimal transport problems, with routines and examples to align brain data (fMRI)
https://alexisthual.github.io/fugw/
MIT License
37 stars 6 forks source link

[BUG] Mix-up between inter and intra subject weights #78

Closed pbarbarant closed 3 weeks ago

pbarbarant commented 1 month ago

In FUGWBarycenter, the weights_list arguments is passed to update_barycenter_features. weights_list describes the probability weights in each subject and not the weight of the subject in the variational formulation of the barycenter. I propose to add subject_weights as an argument passed to the fit() method in order to further avoid this confusion.

bthirion commented 4 weeks ago

I'm unsure why this parameter is important ?

pbarbarant commented 4 weeks ago

I'm unsure why this parameter is important ?

These are the lambdas in the variational formulation:

\min _\mu \sum_k \lambda_k d_{F G W, \alpha, 1, q}^{\mathbb{R}^d}\left(\mu, \mu_k\right)

In practice everyone gets assigned the same weight, it's essentially for the consistency with POT.

bthirion commented 4 weeks ago

But if we're sure that we never change the weights, why not hard-coding the default (to unclutter the API) ?