distributed-learning-contributivity icon indicating copy to clipboard operation
distributed-learning-contributivity copied to clipboard

make the library label agnostic

Open arthurPignet opened this issue 5 years ago • 2 comments
trafficstars

Currently most of the functions work with the assumptions that the labels are one-hot-encoded vectors.

Besides the fact that it is not responsive, sometime we need to play with label index. (first label is indexed 1, second label 2, and so on) A solution can be to add (automatically) at the dataset generation a dict of label, where the keys would be integer and the values would be the vectors for instance.

An instance with MNIST :

dataset.dic_label = { 0: [1,0,0,0,0,0,0,0,0,0], 1 : [0,1,0,0,0,0,0,0,0,0], 2 : [0,0,1,0,0,0,0,0,0,0], 3 : [0,0,0,1,0,0,0,0,0,0], 4 : [0,0,0,0,1,0,0,0,0,0], 5 : [0,0,0,0,0,1,0,0,0,0], 6 : [0,0,0,0,0,0,1,0,0,0], 7 : [0,0,0,0,0,0,0,1,0,0], 8 : [0,0,0,0,0,0,0,0,1,0], 9 : [0,0,0,0,0,0,0,0,0,1]}

arthurPignet avatar Oct 01 '20 12:10 arthurPignet

Is this still relevant @arthurPignet ?

bowni avatar Nov 05 '20 15:11 bowni

Yes it is. The split of the data between partners is label agnostic, but it is not he case of the shuffling/corruption Basically, the only type of labels accepted is one-hot.

arthurPignet avatar Nov 05 '20 15:11 arthurPignet