BinaryHypervectors
Documentation for BinaryHypervectors.
BinaryHypervectors.BinaryHypervectorBinaryHypervectors.BinaryHypervectorBase.:*Base.:+Base.bindBase.circshiftBinaryHypervectors.bundleBinaryHypervectors.hammingsimilarityBinaryHypervectors.sequence_encoding
BinaryHypervectors.BinaryHypervector — MethodBinaryHypervector(ndim::Int)Create a random binary hypervector with ndim dimensions.
BinaryHypervectors.BinaryHypervector — MethodBinaryHypervector(x::BitVector)Create a BinaryHypervector by rounding an AbstractVector elementwise to 0 or >= 0.5.
Base.:* — MethodBase.:*(x::BitVector, y::BitVector)Binds two bit vectors. Equivalent to bind(x, y).
Base.:+ — MethodBase.:+(x::BitVector, y::BitVector)Bundle two bit vectors. Equivalent to bundle(x, y).
Base.bind — Methodbind(x, y)Bind two vectors using XOR. Applied efficiently by exploiting the chunk structure of BitVectors.
Base.circshift — FunctionBase.circshift(x::BinaryHypervector, n)Permute the BinaryHypervector by performing the circular shift n bits to the right.
BinaryHypervectors.bundle — Methodbundle(vecs...)Bundle vectors using majority rule. Ties broken deterministically using the rule from Hannagan et al. (2011, CogSci).
BinaryHypervectors.hammingsimilarity — Methodhammingsimilarity(x, y)Compute 1 minus the normalized Hamming distance between the vectors x and y. Uses chunk structure of BitVectors for speed.
BinaryHypervectors.sequence_encoding — Functionsequence_encoding(seqlen, ndim=2^13)Create correlated sequence encodings with seqlen elements. Each BinaryHypervector in the returned list is correlated with its immediate neighbors, but the correlation drops with distance.