hyperdimensional-computing / torchhd

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

Add methods to form thermometer codes #93

Closed denkle closed 1 year ago

mikeheddes commented 1 year ago

I'm wondering whether it would be better to keep the same API as for the other hypervector creation functions where you can specify the number of vectors and their dimensions. Because for 10000 dimension this will create a very large matrix while you might only need to use 6 hypervectors or something.

denkle commented 1 year ago

I'm wondering whether it would be better to keep the same API as for the other hypervector creation functions where you can specify the number of vectors and their dimensions. Because for 10000 dimension this will create a very large matrix while you might only need to use 6 hypervectors or something.

Will work now on revising the code to address this.

denkle commented 1 year ago

Thanks, @mikeheddes! Agree with the point on separate PR for changing embeddings' API for all classes. Just let me know if you would like to start it or whether I should give the first try. It might at least be worth checking if the code for Thermometer was reasonable.

mikeheddes commented 1 year ago

@denkle you can start working on that feature if you want. What you had before was in the right direction I think, it's a similar API to the functional ones. The only thing that was still missing is making sure that the dtype of the created tensors matches (or is compatible with) the provided VSA_Model.