mixle.reason.modality module¶
Structured modality views for belief-centered cross-modal reasoning.
Each modality is represented as its own typed Mixle sub-model: a
SequenceEncodableProbabilityDistribution that can be scored and sampled,
with a declared symmetry group such as "translation", "permutation",
or "none". A ModalityView keeps that structure visible until a
receiver explicitly asks for a task-specific representation.
This module provides the view contract and ModalityGraph, which groups
multiple named views for one entity. Cross-modal claims should be compared
against an appropriate fixed-width baseline using measured accuracy and
calibration, not assumed from representation shape alone.
- class ModalityView(name, dist, symmetry_group='none', notes=<factory>)[source]
Bases:
objectOne modality as a typed structured belief: a real mixle distribution plus its symmetry group.
distis any fittedSequenceEncodableProbabilityDistribution: for example a categorical model over labels, a Gaussian or Student-t model over measurements, a neural density over an embedding-shaped field, or a Bayesian network over a structured record.symmetry_groupnames the invariance the modality declares, such as"none","translation","permutation", or"rotation".- score(x)[source]
Return
log p(x)under this modality’s structured belief.
- sample(n=1, *, seed=None)[source]
Draw from this modality’s own sampler.
- class ModalityGraph(views=<factory>)[source]
Bases:
objectA named collection of
ModalityViewfor one entity.Belief walks hop across this joint representation. A receiver reads named modalities and their own scores rather than an implicit shared vector.
- add(view)[source]
Add a modality view and return the graph for chaining.
- Parameters:
view (ModalityView)
- Return type:
ModalityGraph