Recognition#
- class hybrid_aif.Recognition[source]#
Bases:
NamedTupleOne amortized variable’s structural declaration: its recognition slot.
A q-side factor:
variableis its child andparentsits conditioning set.System.recognitionholds these (the structure);SystemParams.recognition[variable]holds the module.hybrid_aif.inference.amortized.validate_structure()enforces that no parent is another amortized variable and no two entries share a module object.variableis a state factor name (the amortized posterior for that state factor) or any other name (an auxiliary q-side variable, such as an observation embedding).parentsis explicit, in the module’s parent order, each entry one of"<factor>"a state factor’s value at this tick (the predicted one, for a variableinferred after it),
"obs:<modality>"this tick’s observation of that modality,"recognition:<name>"an earlier recognition variable’s value,"external:<name>"a vector this System does not declare, supplied per call as data anddeclared (name, width) in
System.external_inputs.
Evaluation is in declaration order, so a parent must be declared earlier.
Design: docs/design/amortization.md A11
- static __new__(_cls, variable, parents)#
Create new instance of Recognition(variable, parents)