DescriptionLength#
- class hybrid_aif.DescriptionLength[source]#
Bases:
NamedTupleA model’s length, or a model’s and a trace’s together, in nats.
The model part is
structureplusparameters; the data part isdata. A black box the System holds (an external process declared by its ports alone) is priced by its ports, which are declared structure: its out-ports are emissions of the graph code, each with its size code, and an in-port nothing drives a control node. Its inside, the kernel between the ports, is listed underblack_box:<component>(black_boxfor a System that is one) with every link unscored: its four pairs are inunscored, nothing of it is instructure,parametersortotal, andexactisFalse, since the total leaves the inside out. Its floor would be a code length for its program, which is not built (description-length.md D3). A System that states nothing but black-box ports has no graph record: its totals are its ports’ codes.- data: float | None#
The data part: the trace’s free energy summed along a replay;
Nonefor the model alone.
- learned: tuple[str, ...]#
The addresses a replay learned, whose family links the data part pays for instead (D6).
- data_exact: bool | None#
Whether the data part is the exact free energy of the tick’s posterior:
Falsewhere a neural likelihood, anMLPConditionaltransition or aNonlinearGaussianTransitionenters it, each read through its linearisation, so the data part is the free energy of the linearised model;Nonewithout a replay.
- property bits: tuple[float, float, float]#
(structure, parameters, total)in bits;totalincludes the data part where there is one.
- static __new__(
- _cls,
- structure,
- parameters,
- total,
- per_address,
- exact,
- unscored,
- data=None,
- learned=(),
- data_exact=None,
Create new instance of DescriptionLength(structure, parameters, total, per_address, exact, unscored, data, learned, data_exact)