Open Openyoureyes-Li opened 1 year ago
Hi, do you solve your problem? I don't understand this step as well.
Hi,
The shift function is simply because participants could wear the EMG cuff in different orientations. This this function was a way to virtually align the cuffs of all participants based on some features that were most prevalent in a given channel (i.e. if the signal was most prevalent in channel 3 for participant and given a reference gesture while it was more prevalent in channel 5 for another participant, we virtually shift them so that the signal end up being at approximately the same orientation.)
Honestly, you don't need to use this function, the network during the pre-training should be able to learn a meaningful feature space to have good inference over the different participants and the fine-tuning step with the participant you are interested to do control with should also take care of any shift.
tl;dr, I don't use that type of functions anymore because I did not find it to really impact anything in practice.
Hi, now I understand your motivation for this function, and I agree with you that the neural networks might have the ability to align them without this function. But back on this function (just for discussion), np.roll would shift the data along the time axis. That means the data at one timestamp will be rolled to another timestamp. However, I think the alignment wants to roll the data from one channel to another channel. Thus I guess the axis is selected wrongly. What's your idea?
Best Gaole Dai
Hi,
Yes indeed, the np.roll is supposed to affect the channel axis and not the time axis. From memory, I had the shape of the matrix correctly to affect the channel axis and not the temporal one, but I of course can be wrong (I unfortunately do not have the code setup on my computer to be able to rapidly check). So thank you for raising this flag :)
All the best, Ulysse
Hello, the shift_electrodes function are defined in load_pre_training_dataset.py and load_evaluation_dataset.py files, What does this function do?
def shift_electrodes(examples, labels): index_normal_class = [1, 2, 6, 2] # The normal activation of the electrodes. class_mean = []
For the classes that are relatively invariant to the highest canals activation, we get on average for a