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 universal cosine and dot similarity support #82

Closed mikeheddes closed 2 years ago

mikeheddes commented 2 years ago

All the supported hypervector types are now also supported by cosine_similarity, dot_similarity and hamming_similarity. Based on @rgayler's comments in #72 and #80 we will keep the three different similarity functions but make all of them work for all the supported hypervector types. The two most used similarities, cosine_similarity and dot_similarity are also aliased for easy access. The hamming_similarity is kept as a helper function for the analysis of certain binary processes.