mixle.reason.transport_edge module¶
Per-edge premise checks for cross-modal transport.
Every real modality edge should prove that a plain conditional transport is usable and calibrated on that edge’s own data before the edge is trusted in a belief graph. Calibration is checked against held-out truth for the edge rather than transferred from unrelated examples.
This module exposes a reusable per-edge check with two decisions:
premise fails: the edge should not be used for cross-modal purposes;
premise passes: the plain conditional transport may be composed as-is.
The check focuses on calibration because a genuine edge usually does not have a closed-form reference posterior. Coverage of the transport’s credible intervals against held-out truth is the available metric for a real edge.
- class EdgeTransportVerdict(edge_name, usable, coverage_rates=<factory>, p_values=<factory>, reason='')[source]
Bases:
objectPremise decision for one real modality edge, computed on that edge.
- coverage_consistent_with_nominal(covered_flags)[source]
(observed_rate, p_value)for a two-sided binomial test of coverage against1 - ALPHA.
- fit_conditional_transport(data, *, x_dim, y_dim, k=3, max_its=30, m_steps=80, lr=3e-3, seed=0, delta=1.0e-9, reuse_estep_ll=True)[source]
Fit
p(cond | target)and return a sampler withsample_given.Uses
mixle.models.mixture_density.build_mdn()andNeuralConditionalDensity, fit throughoptimize(). Passdelta=None, reuse_estep_ll=Falsefor an edge whose relationship needs the full iteration budget rather than early stopping.