microsoft/robustlearn

DIVERSIFY preprocessed data emg_y.npy[:, 2] is all 0

chocooni opened this issue · 4 comments

Hi,

In your DIVERSIFY code, the 【def loaddata_from_numpy】in /datautil/actdata/util.py defines:

x = np.load('.../emg_x.npy')
ty = np.load('.../emg_y.npy')
cy, py, sy = ty[:, 0], ty[:, 1], ty[:, 2]

I suppose cy is class label, py is subject label, but sy is all 0.
I'm confused what does this 【sy】stands for?

Thank you.

Hi, this label is not designed for EMG. Sy means sensor positions in other datasets, e.g. DSADS. In other tasks, we can utilize sy to split datasets.

Hi, this label is not designed for EMG. Sy means sensor positions in other datasets, e.g. DSADS. In other tasks, we can utilize sy to split datasets.

Thank you for your reply!

Could you share how did you preprocess the data, i.e. the sliding window technique?

Also, could you share how to add Transformer as backbone as mentioned in your paper?

Thanks.

For preprocessing, try the following codes. Slight adaptations might be required.

image

For other backbones, e.g. Transformer, please replace ActNetwork with your backbones. And make sure that your backbones can return extracted features.

For preprocessing, try the following codes. Slight adaptations might be required.

image

For other backbones, e.g. Transformer, please replace ActNetwork with your backbones. And make sure that your backbones can return extracted features.

Thank you for your reply, that's very helpful!