How flavio-ponzina/microhd works
This repository provides two command-line experiments for training and resource-aware optimization of hyperdimensional classifiers: one uses ID-level encoding and the other projection encoding. Each selects and prepares a dataset, trains and evaluates a baseline, then searches encoding dimensions and quantization settings (plus levels for ID-level) under accuracy-drop thresholds, reporting estimated memory and bit operations. Shared encoders, classifier, training/evaluation routines, and requirement calculations live in utils.py. Edges follow explicit calls in the excerpts; external dataset sources are shown as inputs, not as inspected integrations.
Main entry points: MicroHD-idlev-binary-search.py ID-level search · MicroHD-proj-binary-search.py Projection search · utils.py Train and evaluate
Components 8
Optimization experiments
- ID-level search
code/MicroHD-idlev-binary-search.py - Projection search
code/MicroHD-proj-binary-search.py
Model runtime
- HD encoders
code/utils.py - HD classifier
code/utils.py - Train and evaluate
code/utils.py - Resource estimates
code/utils.py
Other components
- Experiment user
- Dataset sources
Connections 14
- Experiment user → ID-level search: runs
code/MicroHD-idlev-binary-search.py - Experiment user → Projection search: runs
code/MicroHD-proj-binary-search.py - ID-level search → Dataset sources: loads data
code/MicroHD-idlev-binary-search.py - Projection search → Dataset sources: loads data
code/MicroHD-proj-binary-search.py - ID-level search → HD encoders: creates encoder
code/MicroHD-idlev-binary-search.py - Projection search → HD encoders: creates encoder
code/MicroHD-proj-binary-search.py - ID-level search → HD classifier: creates model
code/MicroHD-idlev-binary-search.py - Projection search → HD classifier: creates model
code/MicroHD-proj-binary-search.py - ID-level search → Train and evaluate: trains and evaluates
code/MicroHD-idlev-binary-search.py - Projection search → Train and evaluate: trains and evaluates
code/MicroHD-proj-binary-search.py - ID-level search → Resource estimates: estimates costs
code/MicroHD-idlev-binary-search.py - Projection search → Resource estimates: estimates costs
code/MicroHD-proj-binary-search.py - Train and evaluate → HD encoders: encodes batches
code/utils.py - Train and evaluate → HD classifier: updates and scores
code/utils.py