Interval#

class hybrid_aif.Interval[source]#

Bases: Module

A closed interval [lower, upper], broadcastable like its member arrays.

The two flags are static fields, so they cannot be traced and must agree across a lax.scan carry; each combinator below propagates them.

lower: Array#

The lower end.

upper: Array#

The upper end.

derived: bool = True#

Whether the enclosure is guaranteed, given a correct implementation, on the model the planner was handed; False marks a number a net produced, which nothing bounds. A result is derived iff every input is (an AND through every combinator). Estimators declare it once at registration (hybrid_aif.objectives.registry).

approximate: bool = False#

Whether that model is a linearised or quadrature reading of the declared one (a nonlinear transition or a neural likelihood), so the enclosure holds for the reading, not for the declaration. ORed through every combinator: a result is approximate iff any input is.

classmethod exact(value, derived=True, approximate=False)[source]#

A zero-width interval: the estimate is a point.

derived=False is the amortized leaf, a point estimate with no warrant (a critic’s value, an ensemble’s Monte-Carlo info gain). approximate=True marks a point read off a linearised or quadrature model.

clip_lower(x)[source]#

Clamp both bounds below at x (elementwise); keeps lower <= upper.

__init__(lower, upper, derived=True, approximate=False)#