mixle.inference.create module

Certified model creation from data.

create fits a model through the ordinary Mixle inference machinery and returns a CreatedModel artifact rather than a bare distribution. The artifact contains the fitted model, an estimation certificate, optional calibration, optional uncertainty quantification, and provenance.

The budget and device arguments are recorded as constraints and bias the automatic structure search toward smaller, independence-first models. They do not replace task-specific compression or edge-distillation workflows; they make the creation boundary explicit when a caller already knows the deployment envelope.

class CreatedModel(model, certificate, strategy, calibration=None, uq=None, provenance=<factory>)[source]

Bases: object

A certified model artifact: the fitted model plus its guarantees and provenance.

Parameters:
model: Any
certificate: Any
strategy: str
calibration: Any | None = None
uq: Any | None = None
provenance: dict[str, Any]
property guarantee: Any

The aggregate estimation guarantee (MIN over blocks) – the artifact’s headline claim.

why()[source]

One line summarizing how the artifact was estimated.

Return type:

str

is_calibrated()[source]

Whether the calibration holdout judged the model calibrated (None if not checked).

Return type:

bool | None

create(data, *, budget=None, device=None, calibrate=None, quantify_uq=False, max_its=25, seed=0)[source]

Create a certified model from data (see module docstring).

data is a list of records/scalars. calibrate (a fraction in (0,1)) reserves a holdout for a PIT calibration check. quantify_uq=True attaches an auto-selected UQ handle. budget / device (any object; recorded verbatim) constrain the fit toward a smaller model. Returns a CreatedModel bundling the fit, its certificate, and the requested post-conditions.

Parameters:
  • data (Any)

  • budget (Any | None)

  • device (Any | None)

  • calibrate (float | None)

  • quantify_uq (bool)

  • max_its (int)

  • seed (int)

Return type:

CreatedModel