hyperdimensional-computing / torchhd

Torchhd is a Python library for Hyperdimensional Computing and Vector Symbolic Architectures
https://torchhd.readthedocs.io
MIT License
221 stars 23 forks source link

Unnecessary use of Random embeddings in EMG example #155

Closed Zeldax64 closed 9 months ago

Zeldax64 commented 9 months ago

The example implements the temporal encoder shown in the paper "Hyperdimensional biosignal processing: A case study for EMG-based hand gesture recognition", which is depicted in the paper's Figure 4.

The encoding of temporal information is done solely by the permutation of spatial encoded samples, and there is no binding to random vectors. Thus, I believe that the binding to "timestamps" Random embedding is unnecessary. https://github.com/hyperdimensional-computing/torchhd/blob/83fdf340d0ca74938e496815339466815cf7d909/examples/emg_hand_gestures.py#L42

I've ran some tests using different random seeds and the accuracy values remain the same (sometimes with small changes) when removing the mentioned line.

mikeheddes commented 9 months ago

Thank you for reporting this issue, great catch. And thank you for opening a pull request already.