VSAModel¶
The immutable container that defines a complete VSA algebra.
vsax.core.model.VSAModel
dataclass
¶
Immutable container defining a complete VSA algebra.
VSAModel combines a representation type, operation set, and sampling function to define a complete VSA system. It does not perform operations itself, but serves as a configuration object used by VSAMemory and encoders.
Attributes:
| Name | Type | Description |
|---|---|---|
dim |
int
|
Dimensionality of all hypervectors in this model. |
rep_cls |
type[AbstractHypervector]
|
The hypervector representation class (e.g., ComplexHypervector). |
opset |
AbstractOpSet
|
The operation set instance defining bind/bundle/inverse operations. |
sampler |
Callable[[int, int, PRNGKey], ndarray]
|
Function to sample random vectors with signature (dim: int, n: int, key: PRNGKey) -> jnp.ndarray. |
Example
from vsax.representations import ComplexHypervector from vsax.ops import FHRROperations from vsax.sampling import sample_complex_random model = VSAModel( ... dim=512, ... rep_cls=ComplexHypervector, ... opset=FHRROperations(), ... sampler=sample_complex_random ... )