epfl-lts2 / pygsp

Graph Signal Processing in Python
https://pygsp.rtfd.io
BSD 3-Clause "New" or "Revised" License
483 stars 93 forks source link

classification_tikhonov modifies one of its parameter taken in input #71

Closed Algue-Rythme closed 4 years ago

Algue-Rythme commented 4 years ago

Hi,

The learning.classification_tikhonov function (and its variants) take the labels y as input. The user of the function should not expect this array to be modified. But because of y[M == False] = 0 the array is modified, which is very annoying. Indeed, for validation purposes, it might be useful to store the real labels in y[M == False].

I suggest to either:

nperraud commented 4 years ago

Hi Algue-Rythme Thank you very much for reporting this. This is plainly a bug that should be addressed. I believe that we should copy the data for this not happen. I will make a PR very soon.

nperraud commented 4 years ago

Continuous integration is broken. We need to fix that before we can merge to master... But it is on the way.

mdeff commented 4 years ago

Sorry for the delay, I had to fix the CI before merging. Thanks @Algue-Rythme for reporting and @nperraud for fixing!