User Manual
The User Manual explains why PyHDC works the way it does. It is understanding-oriented: you can read it without running any code, and it will deepen your intuition for HDC as a computational paradigm.
Contents
- HDC Theory and Mathematics
- Encodings Overview
- Binding Operations
- ElementMultiplication
- CircularConvolution and CircularCorrelation
- ExclusiveOr (XOR)
- Shifting and Inverse Shifting
- SegmentShifting and SegmentInverseShifting
- AdditiveContextDependentThinning (CDT)
- VectorDerivedTransformation (VTB)
- MatrixMultiplication (MBAT)
- ElementAngleAddition and ElementAngleSubtraction
- Bundling Operations
- Similarity Metrics
- Random Number Generators
- The HDCGenerator interface
- Generator output types and encoding compatibility
- LCG: Linear Congruential Generator
- LFSR: Linear Feedback Shift Register
- DLFSR: Digit-Serial LFSR
- LCA: Linear Cellular Automata
- PCG: Permuted Congruential Generator
- Xorshift family
- ShiftedCounter family
- When to use each family
- Dual Backend Architecture
- The components Submodule
Overview
- HDC Theory and Mathematics
The mathematics of hypervectors: near-orthogonality, capacity, and why the three primitives (bundle, bind, similarity) are sufficient for symbolic reasoning.
- Encodings Overview
The
Encodingbase class andEncodingSpecdesign; a tour of all four encoding families (MAP, HRR/FHRR, Matrix, Binary/Sparse).- Binding Operations
Deep dive on every binding operation: element multiplication, circular convolution, XOR, shift, matrix transformation, and more.
- Bundling Operations
Deep dive on every bundling operation: addition variants, normalisation, majority vote, bitwise OR, and thinned OR.
- Similarity Metrics
Cosine, Hamming, Overlap, and Angle distance: formulas, output ranges, batched calling conventions, and remapping.
- Random Number Generators
The seven generator families; LCG, LFSR, DLFSR, LCA, PCG, Xorshift, ShiftedCounter; with design rationale and a compatibility matrix.
- Dual Backend Architecture
How PyHDC’s dual NumPy / PyTorch backend is implemented, when to use each, and how device placement works.
- The components Submodule
The
pyhdc.componentssubmodule: building blocks for custom encodings and advanced post-processing pipelines.