WBTransport icon indicating copy to clipboard operation
WBTransport copied to clipboard

Possible mis-indexing?

Open balazsmorv opened this issue 11 months ago • 2 comments

Dear Authors,

First of all, thank you for the implementation of the paper!

Secondly, I am trying to use this label regularization (reference to line of code below) on a dataset and noticed that the group sparcity matrix here is always the zero matrix. Upon further investigation, i believe that the correct way to do this would be to only zero out the $i^{th}$ row's unmatching label indices: group_sparsity_matrix[i, ind_diff] = 0. Am I onto something, or there is something I'm missing?

Reference to the line of code: https://github.com/eddardd/WBTransport/blob/eaee19420d53c784e268cd081aa14f9d29b8af6e/msda/ot_laplace.py#L225

Thank you in advance!

balazsmorv avatar Mar 27 '25 16:03 balazsmorv

Hi @balazsmorv

Thanks for reaching out. I do think you're onto something - your explanation makes sense to me.

This code is quite old, it is still available for reproducibility purposes.

At the time, I was using some routines I adapted from the code from PythonOT. At this point, I should probably revise the code to agree with the actual code it is implemented in their library.

I invite you to do so - use PythonOT, rather than what is implemented in these routines. If you notice the same bug there, you should open an issue accordingly

For barycenter computations, I also point you to more recent code such as PyDiL which has much more features.

eddardd avatar Mar 27 '25 19:03 eddardd

Thank you very much!

balazsmorv avatar Apr 10 '25 21:04 balazsmorv

I am closing this issue. Please feel free to open a new one in case you find any problems :)

eddardd avatar Jul 10 '25 08:07 eddardd