Index into the user-facing design matrix data: Array2<f64> — i.e. the
position of a covariate column in the raw input frame, before any
per-family basis expansion or intercept/parametric layout is applied.
Error returned when an illegal (ResponseFamily, InverseLink) cell is
presented to LikelihoodSpec::try_new or surfaced during
deserialization. Only the cells enumerated by LikelihoodSpec::kind are
legal; every other product cell would silently mask a wrong response
transformation (e.g. Poisson + Identity predicting μ = η, which can go
negative).
Inertia of a symmetric matrix (count of positive / zero / negative
eigenvalues). Used by bump_with_matrix and other indefinite-aware
stabilization rules to drive δ from spectral evidence rather than a
condition-number heuristic.
Transparent serde shadow of LikelihoodSpec with the identical wire shape
(response, link). All (de)serialization of LikelihoodSpec routes
through this type so the legal-matrix check in
TryFrom<LikelihoodSpecWire> runs on every load, closing the
saved-bytes hole: an illegal (response, link) cell deserializes into a
serde error instead of a silently-masked spec.
Runtime state shared by the two-parameter Sas and BetaLogistic links:
an epsilon skew/asymmetry term plus a raw log-scale parameter (log_delta)
and its derived positive companion (delta). The delta field’s meaning is
link-specific — see its doc — so derivative kernels must consume log_delta,
never delta.
Error returned when narrowing a wide LinkFunction into a StandardLink.
Sas and BetaLogistic are state-bearing and have no legal Standard(_)
representation; they must be routed through InverseLink::Sas /
InverseLink::BetaLogistic.
Error returned when an InverseLink cannot be paired with a particular
response family because the link is structurally unsupported for that
family. Carries the link name so call sites can produce a useful message
without losing the offending variant.
Shared default for monotone wiggle/deviation blocks. Formula DSL defaults,
workflow configs, and runtime deviation blocks should all derive from this
type so reproducible presets do not drift across layers.
Legal-only enumeration of the (ResponseFamily, InverseLink) cells the
engine recognises. LikelihoodSpec is the product type with ~40 nominal
cells (8 response variants × 5 inverse-link variants), but only the cells
listed here are honoured by the family math; the rest are silently masked
by fallback arms. FamilySpecKind is the canonical projection used by
naming, predicates, and dispatch.
Shared engine-level link selector for generalized models. This is the
“wide” link descriptor: CLI parsing, formula DSL, and the projection from
InverseLink::link_function() all live in this enum, so it carries every
link kind the engine knows about — including the state-bearing
Sas / BetaLogistic cases.
Classifier for a ResponseDegeneracy. Each variant carries the family-
specific evidence the caller needs to format a useful message without
having to re-derive the diagnostic.
Reason ResponseFamily::infer_from_response refused to pick a default
family. Kept as an enum so future policy extensions (e.g. “refuse on
constant response” — currently a separate CLI-side check) can be added
without breaking the call site’s match arms.