Skip to main content

Module warm_start_transfer

Module warm_start_transfer 

Source
Expand description

Cross-fit warm-start transfer: build a starting ρ iterate for a new fit from a structurally-matching parent FitArtifact.

This is the ρ half of the transfer (the marquee LOSO win): for each new term, if a parent term shares its TermIdentityKey, copy the parent’s converged log-smoothing parameters into the new ρ layout — clamped out of the saturated box. Unmatched / brand-new terms fall back to the new fit’s penalty-label default. β always stays cold (zeros at the new reduced block widths, seeded by the caller); only ρ transfers.

Every path is exactness-preserving: a warm ρ only changes where the outer optimizer starts; it still runs to its KKT/REML certificate, so the converged optimum is identical to a cold start within tolerance. On any anomaly — missing parent, descriptor mismatch, non-finite payload — the build returns an error and the caller cold-starts, so a misfired transfer can never fail a fit.

Structs§

TermBuildContext
Per-term context for the new (about-to-run) fit. Carries everything the transfer needs to lay ρ out in the new fit’s coordinate system, plus the per-block gauge lift T_b : reduced → raw used to project the parent’s RAW β into this fold’s reduced coordinates, without reaching back into the solver internals.
TransferConfig
Configuration knobs for the transfer. Defaults are the magic path; there are no user-facing flags.
TransferResult
Result of a warm-start build: the new ρ vector, the per-block warm β (in the NEW fit’s reduced coordinates), and a per-term provenance trace for logging / tests.

Enums§

TransferError
Errors that abort a transfer build. Callers treat any error as “use the all-cold result” — a transfer must never fail a fit. The error variant is retained so tests can assert which guard fired.

Functions§

build_warm_start
Build a warm-start iterate for new_descriptor from parent.